-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile.tools_local
44 lines (32 loc) · 1.39 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
###########
# 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 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.20.3
# 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