-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 865 Bytes
/
Dockerfile
File metadata and controls
38 lines (31 loc) · 865 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
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM golang:1.17.3-alpine
# Set destination for COPY
WORKDIR /app
# Download Go modules
COPY go.mod .
COPY go.sum .
RUN go mod download
# Copy the source code. Note the slash at the end, as explained in
# https://docs.docker.com/engine/reference/builder/#copy
COPY *.go ./
COPY app ./app
COPY common ./common
COPY controller ./controller
COPY docs ./docs
COPY env ./env
COPY models ./models
COPY router ./router
COPY service ./service
# Build
RUN go build -o /conv
# This is for documentation purposes only.
# To actually open the port, runtime parameters
# must be supplied to the docker command.
EXPOSE 8080
# (Optional) environment variable that our dockerised
# application can make use of. The value of environment
# variables can also be set via parameters supplied
# to the docker command on the command line.
#ENV HTTP_PORT=8081
# Run
CMD [ "/conv" ]