File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 1
- FROM golang:1.17-alpine as builder
1
+ FROM golang:1.17.13 -alpine as builder
2
2
3
3
ENV GOOS=linux
4
-
5
- WORKDIR /opt/acnodal/src
4
+ WORKDIR /opt/epic-gateway/src
6
5
COPY . ./
7
6
8
- # build the web service (static)
7
+ # build the executable (static)
9
8
RUN go build -tags 'osusergo netgo' -o ../bin/web-service main.go
10
9
11
10
12
11
# start fresh
13
- FROM golang:1.17-alpine
14
- ENV bin=/opt/acnodal/bin/web-service
12
+ FROM alpine:3.16.7
15
13
16
- # copy executables from the builder image
14
+ # copy executable from the builder image
15
+ ENV bin=/opt/epic-gateway/bin/web-service
17
16
COPY --from=builder ${bin} ${bin}
18
17
19
18
EXPOSE 8080
20
19
21
- # The softlink is because Dockerfile variable interpolation happens at
22
- # run-time so if you have variables in the CMD string they won't get
23
- # resolved to their values. This lets us have a hard-coded CMD string
24
- # that links to the image-specific command.
25
- RUN ln -s ${bin} /opt/acnodal/bin/cmd
26
- CMD ["/opt/acnodal/bin/cmd" ]
20
+ CMD ["/opt/epic-gateway/bin/web-service" ]
You can’t perform that action at this time.
0 commit comments