15 lines
290 B
Plaintext
15 lines
290 B
Plaintext
# Step 1: Build the Go binary
|
|
FROM scratch
|
|
|
|
# Set the current working directory inside the container
|
|
WORKDIR /app
|
|
|
|
# Copy go.mod and go.sum files
|
|
COPY server ./
|
|
|
|
# Command to run the executable
|
|
RUN chmod a+x main
|
|
CMD ["./server"]
|
|
|
|
# Expose the port on which the Go server will run
|
|
EXPOSE 80 |