From ca2055abaf5c46c1f935477716739fb46522a248 Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Tue, 16 Apr 2019 17:06:59 -0400 Subject: [PATCH] Clean up the satellite image (#1768) This is working on saturn and jupiter, plus travis is ok with it. --- Makefile | 3 --- cmd/satellite/Dockerfile | 22 +++++++++------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index ea186a180..67af55861 100644 --- a/Makefile +++ b/Makefile @@ -132,9 +132,6 @@ satellite-image: satellite_linux_arm satellite_linux_amd64 ## Build satellite Do ${DOCKER_BUILD} --pull=true -t storjlabs/satellite:${TAG}${CUSTOMTAG}-arm32v6 \ --build-arg=GOARCH=arm --build-arg=DOCKER_ARCH=arm32v6 \ -f cmd/satellite/Dockerfile . -.PHONY: satellite-ui-image -satellite-ui-image: ## Build satellite-ui Docker image - ${DOCKER_BUILD} --pull=true -t storjlabs/satellite-ui:${TAG}${CUSTOMTAG} -f web/satellite/Dockerfile . .PHONY: storagenode-image storagenode-image: storagenode_linux_arm storagenode_linux_amd64 ## Build storagenode Docker image ${DOCKER_BUILD} --pull=true -t storjlabs/storagenode:${TAG}${CUSTOMTAG}-amd64 \ diff --git a/cmd/satellite/Dockerfile b/cmd/satellite/Dockerfile index 8baa5542a..79a476f0d 100644 --- a/cmd/satellite/Dockerfile +++ b/cmd/satellite/Dockerfile @@ -1,9 +1,3 @@ -ARG CGO_ENABLED=1 -ARG REPOSITORY=../storj.io/storj -ARG PACKAGE=storj.io/storj/cmd/satellite -FROM storjlabs/golang as build-env -#FROM storjlabs/satellite-ui:5f00274a-philip-satelliteUIDocker-go1.11 as satellite-ui - # Satellite UI static asset generation FROM node:10.15.1 as satellite-ui WORKDIR /app @@ -15,19 +9,21 @@ RUN npm run build FROM alpine as ca-cert RUN apk -U add ca-certificates -# final stage -FROM alpine +ARG DOCKER_ARCH +FROM ${DOCKER_ARCH:-amd64}/alpine +ARG TAG +ARG GOARCH +ENV GOARCH ${GOARCH} ENV API_KEY= \ CONF_PATH=/root/.local/share/storj/satellite \ - BOOTSTRAP_ADDR=bootstrap.storj.io:8080 \ STORJ_CONSOLE_STATIC_DIR=/app \ STORJ_CONSOLE_ADDRESS=0.0.0.0:10100 EXPOSE 7777 EXPOSE 10100 WORKDIR /app -VOLUME /root/.local/share/storj/satellite +COPY --from=satellite-ui /app/static /app/static +COPY --from=satellite-ui /app/dist /app/dist COPY --from=ca-cert /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --from=satellite-ui /app/ /app -COPY --from=build-env /app /app/satellite -COPY /cmd/satellite/entrypoint /entrypoint +COPY release/${TAG}/satellite_linux_${GOARCH:-amd64} /app/satellite +COPY cmd/satellite/entrypoint /entrypoint ENTRYPOINT ["/entrypoint"]