Skip to content

Commit

Permalink
update Docker 0.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
lz1998 committed Apr 12, 2021
1 parent ccb7e35 commit ae2866b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ RUN chmod +x /usr/bin/gmc

COPY --from=ui_builder /build/Client-UI/dist /data/static

CMD "gmc"
ADD ./scripts/env_run.sh /data/

RUN chmod +x /data/env_run.sh

CMD /data/env_run.sh
20 changes: 10 additions & 10 deletions scripts/env_run.sh
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
#!/bin/bash
#!/bin/sh

cmd="gmc "
CMD="gmc"

if [ $UIN ];then
cmd+="-uin $UIN "
CMD="$CMD -uin $UIN"
fi

if [ $PASS ];then
cmd+="-pass $PASS "
CMD="$CMD -pass $PASS"
fi

if [ $PORT ];then
cmd+="-port $PORT "
CMD="$CMD -port $PORT"
fi

if [ $WS_URL ];then
cmd+="-ws_url $WS_URL "
CMD="$CMD -ws_url $WS_URL"
fi

if [ $SMS ];then
cmd+="-sms $SMS "
CMD="$CMD -sms $SMS"
fi

if [ $DEVICE ];then
cmd+="-device $DEVICE "
CMD="$CMD -device $DEVICE"
fi

eval $cmd
echo $CMD
eval $CMD

0 comments on commit ae2866b

Please sign in to comment.