forked from transcom/mymove
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.tools_local
45 lines (33 loc) · 1.45 KB
/
Dockerfile.tools_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
45
###########
# 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 rm -f pkg/assets/assets.go && make pkg/assets/assets.go
RUN make server_generate
RUN rm -f bin/generate-test-data && make bin/generate-test-data
RUN rm -f bin/prime-api-client && make bin/prime-api-client
#########
# FINAL #
#########
FROM alpine:3.14.2
# hadolint ignore=DL3017
RUN apk upgrade --no-cache busybox
COPY --from=builder --chown=root:root /home/circleci/project/bin/generate-test-data /bin/generate-test-data
COPY --from=builder --chown=root:root /home/circleci/project/bin/prime-api-client /bin/prime-api-client
# Certs for mTLS authentication
COPY config/tls/devlocal-mtls.cer /bin/config/tls/devlocal-mtls.cer
COPY config/tls/devlocal-mtls.key /bin/config/tls/devlocal-mtls.key
# Specify testdata needed for integration tests
COPY pkg/testdatagen/testdata/test.pdf /bin/pkg/testdatagen/testdata/test.pdf
COPY pkg/testdatagen/testdata/test.jpg /bin/pkg/testdatagen/testdata/test.jpg
COPY pkg/testdatagen/testdata/test.png /bin/pkg/testdatagen/testdata/test.png
COPY pkg/testdatagen/testdata/update_mto_shipment.json /bin/pkg/testdatagen/testdata/update_mto_shipment.json
# Install tools needed in container
RUN apk update
# hadolint ignore=DL3018
RUN apk add postgresql-client bash --no-cache
WORKDIR /bin