mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-26 16:46:14 +08:00
优化docker镜像编译流程
This commit is contained in:
@@ -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
|
||||
|
||||
|
5
server/manifest/docker/entrypoint.sh
Normal file
5
server/manifest/docker/entrypoint.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /app && ./hotgo &
|
||||
echo "hotgo start all server.."
|
||||
tail -f /dev/null
|
Reference in New Issue
Block a user