Skip to content

Commit

Permalink
Add run container
Browse files Browse the repository at this point in the history
  • Loading branch information
Hcreak committed Oct 16, 2023
1 parent 1ca8256 commit 4392bc8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,17 @@ ADD . .
RUN go mod init github.com/coyove/goflyway
RUN go mod tidy
RUN go build ./cmd/goflyway

FROM alpine:3.18

WORKDIR /opt
COPY --from=go-build build/goflyway .
COPY --from=go-build build/chinalist.txt .
ADD run.sh .

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN chmod +x run.sh

EXPOSE 1081
EXPOSE 1091
CMD ["./run.sh"]
3 changes: 3 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

./goflyway $GLOBAL_FLAG -up="ws://$UP" -k="$KEY" -l="0.0.0.0:1081" -web-port="1091"

0 comments on commit 4392bc8

Please sign in to comment.