initial commit
This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
# Use an official Go runtime as a parent image
|
||||
FROM golang:1.25.5-alpine
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the go mod and sum files to download dependencies
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed
|
||||
RUN go mod download
|
||||
|
||||
# Copy the source code from the current directory to the working directory inside the container
|
||||
COPY . .
|
||||
|
||||
# Command to run the application
|
||||
CMD ["go", "run", "main.go"]
|
||||
Reference in New Issue
Block a user