mirror of
https://gitee.com/goploy/goploy.git
synced 2024-11-30 03:07:59 +08:00
40 lines
1.1 KiB
Docker
40 lines
1.1 KiB
Docker
FROM alpine
|
|
LABEL maintainer="zhenorzz@gmail.com"
|
|
ARG GOPLOY_VER=v1.3.1
|
|
ENV GOPLOY_VER=${GOPLOY_VER}
|
|
|
|
ENV MYSQL_PORT=3306
|
|
|
|
RUN echo "http://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories
|
|
RUN echo "http://mirrors.aliyun.com/alpine/latest-stable/community/" >> /etc/apk/repositories
|
|
|
|
#install
|
|
RUN apk update && \
|
|
apk add --no-cache \
|
|
openssh-client \
|
|
ca-certificates \
|
|
bash \
|
|
git \
|
|
rsync \
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
#git
|
|
RUN git config --global pull.rebase false
|
|
|
|
#goploy
|
|
ADD https://github.com/zhenorzz/goploy/releases/download/${GOPLOY_VER}/goploy /opt/goploy/
|
|
RUN chmod a+x /opt/goploy/goploy
|
|
|
|
EXPOSE 80
|
|
|
|
VOLUME ["/opt/goploy/repository/"]
|
|
|
|
ENTRYPOINT \
|
|
echo 'DB_TYPE=mysql' > /opt/goploy/.env;\
|
|
echo "DB_CONN=${MYSQL_USER}:${MYSQL_PASSWORD}@tcp(${MYSQL_HOST}:${MYSQL_PORT})/goploy?charset=utf8" >> /opt/goploy/.env;\
|
|
echo 'SIGN_KEY=please-study-jwt' >> /opt/goploy/.env;\
|
|
echo 'LOG_PATH=stdout' >> /opt/goploy/.env;\
|
|
echo 'ENV=production' >> /opt/goploy/.env;\
|
|
echo 'PORT=80' >> /opt/goploy/.env;\
|
|
/opt/goploy/goploy
|