优化docker镜像编译流程

This commit is contained in:
孟帅
2023-06-12 10:54:53 +08:00
parent 9ec736f0bc
commit d9d257a067
4 changed files with 28 additions and 19 deletions

View File

@@ -5,12 +5,19 @@ FROM loads/alpine:3.8
###############################################################################
ENV WORKDIR /app
ADD resource $WORKDIR/
ADD ./temp/linux_amd64/main $WORKDIR/main
RUN chmod +x $WORKDIR/main
ADD hack $WORKDIR/hack/
ADD manifest/config $WORKDIR/manifest/config/
ADD resource $WORKDIR/resource/
ADD ./temp/linux_amd64/hotgo $WORKDIR/hotgo
ADD ./manifest/docker/entrypoint.sh $WORKDIR/entrypoint.sh
RUN chmod +x $WORKDIR/hotgo
RUN chmod +x $WORKDIR/entrypoint.sh
###############################################################################
# START
###############################################################################
WORKDIR $WORKDIR
CMD ./main
CMD ./entrypoint.sh

View File

@@ -0,0 +1,5 @@
#!/bin/bash
cd /app && ./hotgo &
echo "hotgo start all server.."
tail -f /dev/null