YOLO Dockerfile to see if Coolify eats it
This commit is contained in:
parent
9512bd677d
commit
7731b9ae50
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
# Use the official Go 1.23 image as the build stage
|
||||
FROM golang:1.23 as build
|
||||
|
||||
# Set the working directory to /app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the Go mod files
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
# Download the dependencies
|
||||
RUN go mod download
|
||||
|
||||
# Copy the application code
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN go build -o main cmd/main.go
|
||||
|
||||
# Use the scratch image as the runtime stage
|
||||
FROM scratch
|
||||
|
||||
# Copy the built application from the build stage
|
||||
COPY --from=build /app/main /main
|
||||
|
||||
# Expose the port
|
||||
EXPOSE 1337
|
||||
|
||||
# Run the command to start the application
|
||||
CMD ["/main"]
|
Loading…
x
Reference in New Issue
Block a user