-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (20 loc) 路 791 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (20 loc) 路 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Start from a Debian image with the latest version of Go installed
# and a workspace (GOPATH) configured at /go.
FROM golang:latest
# Create WORKDIR (working directory) for app
WORKDIR /go/src/github.com/TheGuyWhoCodes/bulkshort
# Copy the local package files to the container's workspace
# (in the above WORKDIR)
ADD . .
# Switch WORKDIR to directory where server main.go lives
WORKDIR /go/src/github.com/TheGuyWhoCodes/bulkshort/
# Build the go-API-template userServer command inside the container
# at the most recent WORKDIR
RUN go build -o main
# Run the userServer command by default when the container starts.
# runs command at most recent WORKDIR
ENTRYPOINT ./main
# Document that the container uses port 8080
EXPOSE 80
# Document that the container uses port 5432
EXPOSE 5432