Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13-buster
FROM golang:1.13-buster AS buildcontainer

ARG SIGNAL_CLI_VERSION=0.6.8
ARG SWAG_VERSION=1.6.7
Expand Down Expand Up @@ -29,10 +29,7 @@ RUN cd /tmp/ \
&& git checkout v${SIGNAL_CLI_VERSION} \
&& ./gradlew build \
&& ./gradlew installDist \
&& ln -s /tmp/signal-cli-${SIGNAL_CLI_VERSION}/build/install/signal-cli/bin/signal-cli /usr/bin/signal-cli

RUN mkdir -p /signal-cli-config/
RUN mkdir -p /home/.local/share/signal-cli
&& ln -s /tmp/signal-cli-${SIGNAL_CLI_VERSION}/build/install/signal-cli/ /tmp/signal-cli

COPY src/api /tmp/signal-cli-rest-api-src/api
COPY src/main.go /tmp/signal-cli-rest-api-src/
Expand All @@ -41,7 +38,15 @@ COPY src/go.sum /tmp/signal-cli-rest-api-src/

RUN cd /tmp/signal-cli-rest-api-src && swag init && go build

ENV PATH /tmp/signal-cli-rest-api-src/:/usr/bin/signal-cli-${SIGNAL_CLI_VERSION}/bin/:$PATH
# Start a fresh container for release container
FROM adoptopenjdk:11-jre-hotspot

COPY --from=buildcontainer /tmp/signal-cli-rest-api-src/signal-cli-rest-api /usr/bin/signal-cli-rest-api
COPY --from=buildcontainer /tmp/signal-cli /opt/signal-cli

RUN ln -s /opt/signal-cli/bin/signal-cli /usr/bin/signal-cli
RUN mkdir -p /signal-cli-config/
RUN mkdir -p /home/.local/share/signal-cli

EXPOSE 8080

Expand Down