update
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -1,5 +1,5 @@
|
||||
# Use golang:1.17 as the base image
|
||||
FROM golang:1.20
|
||||
FROM registry.durp.info/golang:1.20
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV PATH $PATH:$GOPATH/bin
|
||||
@@ -8,13 +8,7 @@ ENV PATH $PATH:$GOPATH/bin
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the Go project files into the container
|
||||
COPY . .
|
||||
|
||||
# Run swag init to generate Swagger documentation
|
||||
RUN go install && go install github.com/swaggo/swag/cmd/swag@v1.8.12 && swag init
|
||||
|
||||
# Build the Go application inside the container
|
||||
RUN go build -o main .
|
||||
COPY ./output/main .
|
||||
|
||||
# Expose the port the application listens on
|
||||
EXPOSE 8080
|
||||
|
||||
Reference in New Issue
Block a user