1 Star 0 Fork 2

蜗牛de战争/file-server

forked from ApulisPlatform/file-server 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
zjupigeon 提交于 2021-08-19 14:42 +08:00 . fix(dockerfile): fix docker file entrypoint
# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.16.4-alpine3.13 as builder
WORKDIR /go/src/github.com/apulis/bmod/file-server
ENV GOPROXY=https://goproxy.cn
ENV GO111MODULE=on
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
# Cache go modules
COPY go.mod .
COPY go.sum .
ADD . .
RUN go mod download
RUN make build
FROM alpine:3.11
COPY --from=builder /go/src/github.com/apulis/bmod/file-server/bin/file-server /root/file-server
COPY --from=builder /go/src/github.com/apulis/bmod/file-server/configs/config.yaml /root
WORKDIR /root
ENTRYPOINT ["./file-server", "run"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bianfu/file-server.git
git@gitee.com:bianfu/file-server.git
bianfu
file-server
file-server
v1.6.0

搜索帮助