-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
22 lines (20 loc) · 816 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM intaniger/smartfarm_backend:latest
RUN rm -rf /go/src/github.com/rod41732/cu-smart-farm-backend
WORKDIR /go/src/github.com/rod41732/cu-smart-farm-backend
COPY . /go/src/github.com/rod41732/cu-smart-farm-backend
RUN go-wrapper download; exit 0
RUN go build main.go
RUN cp /go/src/github.com/rod41732/cu-smart-farm-backend/key.rsa /tmp/
RUN cp /go/src/github.com/rod41732/cu-smart-farm-backend/key.rsa.pub /tmp/
RUN cp /go/src/github.com/rod41732/cu-smart-farm-backend/main /tmp/
# CMD [ "./main" ]
# EXPOSE 3000
FROM alpine
LABEL maintainer "Tanakorn Pisnupoomi"
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
RUN apk --no-cache --update upgrade && apk --no-cache add ca-certificates
COPY --from=0 /tmp /backend
ENV GIN_MODE=release
WORKDIR /backend
CMD ["./main"]
EXPOSE 3000