Mercurial > famtree
comparison backend/dockerfile @ 0:a17a4894f4bd draft default tip
Initial commit converting git to mercurial
author | Alfred Burgess <aburgess@ucc.asn.au> |
---|---|
date | Sun, 14 Apr 2024 19:35:23 +0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a17a4894f4bd |
---|---|
1 # Use an official Go runtime as a parent image | |
2 FROM golang:latest | |
3 | |
4 # Set the working directory inside the container | |
5 WORKDIR /app | |
6 | |
7 # Copy the local package files to the container's workspace | |
8 COPY . . | |
9 | |
10 # Build the Go application | |
11 RUN go build main.go | |
12 | |
13 # Build | |
14 #RUN CGO_ENABLED=0 GOOS=linux go build -o /webapp | |
15 | |
16 # Expose port 8080 to the outside world | |
17 EXPOSE 8080 | |
18 | |
19 # Command to run the executable | |
20 CMD ["./main"] |