Skip to content

Commit

Permalink
tidy Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbbbbbbbbbbba committed Sep 16, 2024
1 parent b4387ca commit bc17c37
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ ENV APP_HOME=/code/bbs-go/server
WORKDIR "$APP_HOME"

COPY ./server ./
RUN go env -w GOPROXY=https://goproxy.cn,direct \
&& go mod download
# RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go mod download

RUN CGO_ENABLED=0 go build -v -o bbs-go main.go && chmod +x bbs-go


Expand Down Expand Up @@ -46,7 +44,6 @@ FROM node:20-alpine
ENV APP_HOME=/app/bbs-go
WORKDIR "$APP_HOME"


COPY --from=server_builder /code/bbs-go/server/bbs-go ./server/bbs-go
COPY --from=server_builder /code/bbs-go/server/*.yaml ./server/
COPY --from=server_builder /code/bbs-go/server/*.yml ./server/
Expand All @@ -57,6 +54,6 @@ COPY --from=admin_builder /code/bbs-go/admin/dist ./server/admin
COPY ./start.sh ${APP_HOME}/start.sh
RUN chmod +x ${APP_HOME}/start.sh

EXPOSE 8082 3000 80
EXPOSE 8082 3000

CMD ["./start.sh"]

0 comments on commit bc17c37

Please sign in to comment.