2019-09-16 14:09:59 +01:00
|
|
|
ARG DOCKER_ARCH
|
2019-02-28 20:12:52 +00:00
|
|
|
# Satellite UI static asset generation
|
2023-07-20 14:37:47 +01:00
|
|
|
FROM node:18.17.0 as ui
|
2019-02-28 20:12:52 +00:00
|
|
|
WORKDIR /app
|
|
|
|
COPY web/satellite/ /app
|
|
|
|
# Need to clean up (or ignore) local folders like node_modules, etc...
|
|
|
|
RUN npm install
|
|
|
|
RUN npm run build
|
2018-06-05 22:06:37 +01:00
|
|
|
|
2020-12-08 20:49:41 +00:00
|
|
|
# Fetch ca-certificates file for arch independent builds below
|
2022-03-25 08:18:58 +00:00
|
|
|
FROM debian:buster-slim as ca-cert
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
|
|
|
|
RUN update-ca-certificates
|
2020-12-08 20:49:41 +00:00
|
|
|
|
2023-06-14 10:19:29 +01:00
|
|
|
# Install storj-up helper (for local/dev runs)
|
|
|
|
FROM --platform=$TARGETPLATFORM golang:1.19 AS storjup
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
|
|
go install storj.io/storj-up@latest
|
|
|
|
|
|
|
|
# Install dlv (for local/dev runs)
|
|
|
|
FROM --platform=$TARGETPLATFORM golang:1.19 AS dlv
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
|
|
go install github.com/go-delve/delve/cmd/dlv@latest
|
|
|
|
|
2022-03-25 08:18:58 +00:00
|
|
|
FROM ${DOCKER_ARCH:-amd64}/debian:buster-slim
|
2019-04-16 22:06:59 +01:00
|
|
|
ARG TAG
|
|
|
|
ARG GOARCH
|
|
|
|
ENV GOARCH ${GOARCH}
|
2020-06-22 20:06:31 +01:00
|
|
|
ENV CONF_PATH=/root/.local/share/storj/satellite \
|
2019-02-28 20:12:52 +00:00
|
|
|
STORJ_CONSOLE_STATIC_DIR=/app \
|
2023-06-14 10:19:29 +01:00
|
|
|
STORJ_MAIL_TEMPLATE_PATH=/app/static/emails \
|
2019-02-28 20:12:52 +00:00
|
|
|
STORJ_CONSOLE_ADDRESS=0.0.0.0:10100
|
2023-06-14 10:19:29 +01:00
|
|
|
ENV PATH=$PATH:/app
|
2018-12-21 16:56:57 +00:00
|
|
|
EXPOSE 7777
|
2019-02-28 20:12:52 +00:00
|
|
|
EXPOSE 10100
|
2018-06-05 22:06:37 +01:00
|
|
|
WORKDIR /app
|
2019-09-16 14:09:59 +01:00
|
|
|
COPY --from=ui /app/static /app/static
|
|
|
|
COPY --from=ui /app/dist /app/dist
|
2020-12-08 20:49:41 +00:00
|
|
|
COPY --from=ca-cert /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
2020-12-11 01:23:39 +00:00
|
|
|
COPY release/${TAG}/wasm/access.wasm /app/static/wasm/
|
|
|
|
COPY release/${TAG}/wasm/wasm_exec.js /app/static/wasm/
|
2020-12-15 19:10:56 +00:00
|
|
|
COPY release/${TAG}/wasm/access.wasm.br /app/static/wasm/
|
|
|
|
COPY release/${TAG}/wasm/wasm_exec.js.br /app/static/wasm/
|
2019-04-16 22:06:59 +01:00
|
|
|
COPY release/${TAG}/satellite_linux_${GOARCH:-amd64} /app/satellite
|
2023-06-14 10:19:29 +01:00
|
|
|
COPY --from=storjup /go/bin/storj-up /usr/local/bin/storj-up
|
|
|
|
COPY --from=dlv /go/bin/dlv /usr/local/bin/dlv
|
|
|
|
# test identities for quick-start
|
|
|
|
COPY --from=img.dev.storj.io/storjup/base:20230607-1 /var/lib/storj/identities /var/lib/storj/identities
|
2019-04-16 22:06:59 +01:00
|
|
|
COPY cmd/satellite/entrypoint /entrypoint
|
2018-08-23 16:48:03 +01:00
|
|
|
ENTRYPOINT ["/entrypoint"]
|