FROM 容器
ENV TZ "Asia/Shanghai"
WORKDIR /home
COPY ./ ./
RUN go build -mod vendor main.go
RUN chmod +x ./main
RUN echo "#!/bin/bash\n./main -c \$APP_ENV" > ./start.sh
RUN chmod +x ./start.sh
CMD ["/bin/bash","/home/start.sh"]
FROM 容器
ENV TZ "Asia/Shanghai"
WORKDIR /home
COPY ./ ./
RUN go build -mod vendor main.go
RUN chmod +x ./main
RUN echo "#!/bin/bash\n./main -c \$APP_ENV" > ./start.sh
RUN chmod +x ./start.sh
CMD ["/bin/bash","/home/start.sh"]