forked from square/keysync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-test
30 lines (21 loc) · 839 Bytes
/
Dockerfile-test
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
FROM openjdk:8-jre-alpine
RUN apk add --update bash go gcc git musl-dev diffutils util-linux coreutils curl && \
rm -rf /var/cache/apk/*
COPY testing /opt/keysync/testing/
RUN adduser -S keysync-test && \
addgroup -S keysync-test && \
java -jar /opt/keysync/testing/keywhiz-server.jar migrate /opt/keysync/testing/keywhiz-config.yaml && \
java -jar /opt/keysync/testing/keywhiz-server.jar db-seed /opt/keysync/testing/keywhiz-config.yaml
ENV GO111MODULE on
COPY go.mod /opt/keysync
COPY go.sum /opt/keysync
WORKDIR /opt/keysync
RUN go mod download
COPY . /opt/keysync
WORKDIR /opt/keysync/cmd/keysync
RUN go build -o /usr/bin/keysync
WORKDIR /opt/keysync/cmd/keyrestore
RUN go build -o /usr/bin/keyrestore
WORKDIR /opt/keysync/cmd/keyunwrap
RUN go build -o /usr/bin/keyunwrap
CMD /opt/keysync/testing/run-tests.sh