init repo
This commit is contained in:
12
Dockerfile.standalone
Normal file
12
Dockerfile.standalone
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM golang:1.22 AS builder
|
||||
|
||||
WORKDIR $GOPATH/src/toyboom-server
|
||||
COPY . .
|
||||
RUN mkdir /app && \
|
||||
CGO_ENABLED=1 GOPROXY=https://goproxy.cn,direct go build -o toyboom-server main.go && \
|
||||
cp toyboom-server /app/
|
||||
|
||||
FROM golang:1.22
|
||||
COPY --from=builder /app/toyboom-server /app/toyboom-server
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT [ "/app/toyboom-server" ]
|
||||
Reference in New Issue
Block a user