forked from transcom/mymove
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.local
44 lines (31 loc) · 1.37 KB
/
Dockerfile.local
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
39
40
41
42
43
44
###########
# BUILDER #
###########
FROM milmove/circleci-docker:milmove-app-012fdffe4833f88f67607cd6801f166d0014c239 as builder
ENV CIRCLECI=true
COPY --chown=circleci:circleci . /home/circleci/project
WORKDIR /home/circleci/project
RUN make clean
RUN make bin/rds-ca-2019-root.pem
RUN make bin/rds-ca-us-gov-west-1-2017-root.pem
RUN rm -f pkg/assets/assets.go && make pkg/assets/assets.go
RUN make server_generate
RUN rm -f bin/milmove && make bin/milmove
#########
# FINAL #
#########
# hadolint ignore=DL3007
FROM gcr.io/distroless/base:latest
COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-2019-root.pem /bin/rds-ca-2019-root.pem
COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-us-gov-west-1-2017-root.pem /bin/rds-ca-us-gov-west-1-2017-root.pem
COPY --from=builder --chown=root:root /home/circleci/project/bin/milmove /bin/milmove
COPY config/tls/Certificates_PKCS7_v5.6_DoD.der.p7b /config/tls/Certificates_PKCS7_v5.6_DoD.der.p7b
COPY config/tls/dod-sw-ca-54.pem /config/tls/dod-sw-ca-54.pem
# While it's ok to have these certs copied locally, they should never be copied into Dockerfile.
COPY config/tls/devlocal-ca.key /config/tls/devlocal-ca.key
COPY config/tls/devlocal-ca.pem /config/tls/devlocal-ca.pem
COPY swagger/* /swagger/
COPY build /build
ENTRYPOINT ["/bin/milmove"]
CMD ["serve", "--logging-level=debug"]
EXPOSE 8080