goploy/docker/Dockerfile

35 lines
870 B
Docker
Raw Normal View History

2021-11-23 10:16:18 +08:00
# Import sql manually https://github.com/zhenorzz/goploy/blob/master/model/sql/goploy.sql
2021-06-01 10:33:58 +08:00
FROM alpine
LABEL maintainer="zhenorzz@gmail.com"
2024-03-29 14:07:48 +08:00
ARG GOPLOY_VER=v1.16.3
2021-06-01 10:33:58 +08:00
ENV GOPLOY_VER=${GOPLOY_VER}
2022-08-16 14:08:02 +08:00
RUN echo "https://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories
RUN echo "https://mirrors.aliyun.com/alpine/latest-stable/community/" >> /etc/apk/repositories
2021-06-01 10:33:58 +08:00
#install
RUN apk update && \
apk add --no-cache \
openssh-client \
ca-certificates \
2022-08-16 14:06:35 +08:00
sshpass \
2021-06-01 10:33:58 +08:00
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/"]
2021-11-24 11:05:46 +08:00
WORKDIR /opt/goploy/
2022-07-16 12:04:37 +08:00
ENTRYPOINT /opt/goploy/goploy --asset-dir=/opt/goploy/repository