1 Star 0 Fork 467

泡椒/go-fastdfs

forked from sjqzhang/go-fastdfs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
sjqzhang 提交于 2023-04-17 10:18 . use go1.18 -> go1.17
FROM registry.cn-hangzhou.aliyuncs.com/prince/alpine-golang:1.17 as builder
MAINTAINER s_jqzhang <s_jqzhang@163.com>
ARG VERSION=1.1.7
RUN set -xe; \
apk update; \
apk add --no-cache --virtual .build-deps \
git; \
mkdir -p /root/repo ; cd /root/repo ; \
git clone https://github.com/sjqzhang/go-fastdfs ; \
cd go-fastdfs; mv vendor src ; mv src .. ; cd .. ; mv go-fastdfs src/github.com/sjqzhang/ ; export GOPATH=/root/repo ; cd src/github.com/sjqzhang/go-fastdfs ; \
export GO111MODULE="off"; \
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o fileserver; \
ls -lh .;
FROM registry.cn-hangzhou.aliyuncs.com/prince/alpine-bash
COPY --from=builder /root/repo/src/github.com/sjqzhang/go-fastdfs/fileserver /
ENV INSTALL_DIR /usr/local/go-fastdfs
ENV PATH $PATH:$INSTALL_DIR/
ENV GO_FASTDFS_DIR $INSTALL_DIR/data
RUN set -xe; \
mkdir -p $GO_FASTDFS_DIR; \
mkdir -p $GO_FASTDFS_DIR/conf; \
mkdir -p $GO_FASTDFS_DIR/data; \
mkdir -p $GO_FASTDFS_DIR/files; \
mkdir -p $GO_FASTDFS_DIR/log; \
mkdir -p $INSTALL_DIR; \
mv /fileserver $INSTALL_DIR/; \
chmod +x $INSTALL_DIR/fileserver;
WORKDIR $INSTALL_DIR
VOLUME $GO_FASTDFS_DIR
CMD ["fileserver", "server" , "${OPTS}"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/paojiao/go-fastdfs.git
git@gitee.com:paojiao/go-fastdfs.git
paojiao
go-fastdfs
go-fastdfs
master

搜索帮助