-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile.local
43 lines (30 loc) · 1.32 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
###########
# BUILDER #
###########
FROM milmove/circleci-docker:milmove-app-3d9acdaa37c81a87b5fc1c6193a8e528dd56e4ed as builder
ENV CIRCLECI=true
COPY --chown=circleci:circleci . /home/circleci/project
WORKDIR /home/circleci/project
RUN make clean
RUN make bin/rds-ca-rsa4096-g1.pem
RUN make bin/rds-ca-2019-root.pem
RUN make server_generate
RUN rm -f bin/milmove && make bin/milmove
#########
# FINAL #
#########
# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian11@sha256:ac69aa622ea5dcbca0803ca877d47d069f51bd4282d5c96977e0390d7d256455
COPY --from=builder --chown=root:root /home/circleci/project/bin/rds-ca-rsa4096-g1.pem /bin/rds-ca-rsa4096-g1.pem
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/milmove /bin/milmove
COPY config/tls/milmove-cert-bundle.p7b /config/tls/milmove-cert-bundle.p7b
COPY config/tls/dod-sw-ca-66.pem /config/tls/dod-sw-ca-75.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