Skip to content

Commit

Permalink
Docs : Dockerfile go version update
Browse files Browse the repository at this point in the history
  • Loading branch information
YuSuhwa-ve committed Feb 20, 2024
1 parent ebdba98 commit 75d83ee
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# Start from the official Go image
FROM golang:1.17-alpine
# Use Go version 1.20 image
FROM golang:1.20-alpine

# Set the Current Working Directory inside the container
# Set the working directory inside the container
WORKDIR /app

# Copy go mod and sum files
# Copy go.mod and go.sum files to the working directory
COPY go.mod go.sum ./

# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed
# Download all dependencies
RUN go mod download

# Copy the source code into the container
# Copy the source code to the working directory
COPY . .

# Build the Go app
RUN go build -o main .

# Command to run the executable
CMD ["./main"]
RUN go build -o main .

0 comments on commit 75d83ee

Please sign in to comment.