2020-08-17 03:54:50 +00:00
|
|
|
FROM golang:latest as golang-build
|
|
|
|
COPY go.mod go.sum /go/src/gitlab.com/signald/test-infrastructure/
|
|
|
|
COPY cmd/ /go/src/gitlab.com/signald/test-infrastructure/cmd
|
|
|
|
WORKDIR /go/src/gitlab.com/signald/test-infrastructure/
|
|
|
|
RUN go mod download
|
|
|
|
RUN go build ./cmd/config-generator
|
|
|
|
|
2019-10-17 04:28:31 +00:00
|
|
|
FROM debian:buster as build
|
2020-08-17 03:54:50 +00:00
|
|
|
RUN apt-get update && apt-get install -y openjdk-11-jre-headless
|
|
|
|
RUN apt-get install -y openjdk-11-jdk-headless maven git
|
2018-12-01 23:23:22 +00:00
|
|
|
RUN git -C /usr/local/src clone https://github.com/signalapp/Signal-Server
|
|
|
|
WORKDIR /usr/local/src/Signal-Server
|
2018-12-05 05:19:10 +00:00
|
|
|
COPY signal-server-patches /tmp/signal-server-patches
|
2020-10-06 01:08:29 +00:00
|
|
|
RUN cat /tmp/signal-server-patches/*.patch | patch -p1
|
2018-12-01 23:23:22 +00:00
|
|
|
RUN mvn install -DskipTests
|
|
|
|
|
2019-10-17 04:28:31 +00:00
|
|
|
FROM debian:buster
|
|
|
|
RUN apt-get update && apt-get install -y openjdk-11-jre-headless
|
2020-08-17 03:54:50 +00:00
|
|
|
COPY --from=build /usr/local/src/Signal-Server/service/target/TextSecureServer-*.jar /usr/share/TextSecureServer.jar
|
|
|
|
COPY --from=golang-build /go/src/gitlab.com/signald/test-infrastructure/config-generator /usr/bin/config-generator
|
2019-10-17 04:28:31 +00:00
|
|
|
COPY migrate-and-start-server.sh /usr/bin/migrate-and-start-server
|
2020-08-17 03:54:50 +00:00
|
|
|
RUN mkdir -p /etc/signal-server
|
2018-12-01 23:23:22 +00:00
|
|
|
RUN useradd signal
|
2020-08-17 03:54:50 +00:00
|
|
|
RUN chown -R signal /usr/share/TextSecureServer.jar /etc/signal-server
|
2018-12-03 17:34:46 +00:00
|
|
|
USER signal
|
2019-10-17 04:28:31 +00:00
|
|
|
CMD ["/usr/bin/migrate-and-start-server"]
|