-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathDockerfile.migrations_local
41 lines (28 loc) · 1.08 KB
/
Dockerfile.migrations_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
###########
# BUILDER #
###########
FROM milmove/circleci-docker:milmove-app-55d6d1fc05e24d833c7b6ddc8f43ca901a40f22c 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 rm -f pkg/assets/assets.go && make pkg/assets/assets.go
RUN make server_generate
RUN rm -f bin/milmove && make bin/milmove
#########
# FINAL #
#########
FROM alpine:3.12.3
# hadolint ignore=DL3017
RUN apk upgrade --no-cache busybox
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 migrations/app/schema /migrate/schema
COPY migrations/app/migrations_manifest.txt /migrate/migrations_manifest.txt
# Install tools needed in container
# hadolint ignore=DL3018
RUN apk update && apk add ca-certificates --no-cache
WORKDIR /
USER nobody
ENTRYPOINT ["/bin/milmove", "migrate", "-p", "file:///migrate/migrations", "-m", "/migrate/migrations_manifest.txt"]