File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1- FROM golang:1.13-buster
1+ FROM golang:1.13-buster AS buildcontainer
22
33ARG SIGNAL_CLI_VERSION=0.6.8
44ARG SWAG_VERSION=1.6.7
@@ -29,10 +29,7 @@ RUN cd /tmp/ \
2929 && git checkout v${SIGNAL_CLI_VERSION} \
3030 && ./gradlew build \
3131 && ./gradlew installDist \
32- && ln -s /tmp/signal-cli-${SIGNAL_CLI_VERSION}/build/install/signal-cli/bin/signal-cli /usr/bin/signal-cli
33-
34- RUN mkdir -p /signal-cli-config/
35- RUN mkdir -p /home/.local/share/signal-cli
32+ && ln -s /tmp/signal-cli-${SIGNAL_CLI_VERSION}/build/install/signal-cli/ /tmp/signal-cli
3633
3734COPY src/api /tmp/signal-cli-rest-api-src/api
3835COPY src/main.go /tmp/signal-cli-rest-api-src/
@@ -41,7 +38,15 @@ COPY src/go.sum /tmp/signal-cli-rest-api-src/
4138
4239RUN cd /tmp/signal-cli-rest-api-src && swag init && go build
4340
44- ENV PATH /tmp/signal-cli-rest-api-src/:/usr/bin/signal-cli-${SIGNAL_CLI_VERSION}/bin/:$PATH
41+ # Start a fresh container for release container
42+ FROM adoptopenjdk:11-jre-hotspot
43+
44+ COPY --from=buildcontainer /tmp/signal-cli-rest-api-src/signal-cli-rest-api /usr/bin/signal-cli-rest-api
45+ COPY --from=buildcontainer /tmp/signal-cli /opt/signal-cli
46+
47+ RUN ln -s /opt/signal-cli/bin/signal-cli /usr/bin/signal-cli
48+ RUN mkdir -p /signal-cli-config/
49+ RUN mkdir -p /home/.local/share/signal-cli
4550
4651EXPOSE 8080
4752
You can’t perform that action at this time.
0 commit comments