Skip to content

Commit

Permalink
{pkg/files/docker/{base,storj,edge,storjscan}: update docker images
Browse files Browse the repository at this point in the history
Update the storj and edge images to use an updated base image with
more dependencies.

Also add a docker image for storjscan.

Change-Id: Id55a8a94a67a3edf478ee973f296d6f257fdc6ed
  • Loading branch information
dlamarmorgan committed Oct 12, 2023
1 parent e8552c4 commit f57c59b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
2 changes: 1 addition & 1 deletion base.last
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20230825-1
20231012-1
2 changes: 1 addition & 1 deletion pkg/files/docker/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \

FROM --platform=$TARGETPLATFORM ubuntu:22.04 AS final
RUN apt-get update
RUN apt-get -y install iproute2 ca-certificates
RUN apt-get -y install iproute2 ca-certificates curl jq unzip
RUN useradd storj --uid 1000 -d /var/lib/storj && \
mkdir -p /var/lib/storj/shared && \
mkdir -p /var/lib/storj/go/bin && \
Expand Down
4 changes: 2 additions & 2 deletions pkg/files/docker/edge.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.3
ARG TYPE
ARG SOURCE
FROM --platform=$TARGETPLATFORM img.dev.storj.io/storjup/build:20230616-1 AS base
FROM --platform=$TARGETPLATFORM img.dev.storj.io/storjup/build:20230627-1 AS base

FROM base AS commit
ARG BRANCH
Expand Down Expand Up @@ -33,7 +33,7 @@ RUN --mount=type=cache,target=/var/lib/storj/go/pkg/mod,mode=777,uid=1000 \
--mount=type=cache,target=/var/lib/storj/.cache/go-build,mode=777,uid=1000 \
go install ./cmd/...

FROM img.dev.storj.io/storjup/base:20230825-1 AS final
FROM img.dev.storj.io/storjup/base:20231012-1 AS final
COPY --from=binaries /var/lib/storj/go/bin /var/lib/storj/go/bin
COPY --from=binaries /var/lib/storj/gateway-mt/pkg/linksharing/web /var/lib/storj/pkg/linksharing/web

Expand Down
2 changes: 1 addition & 1 deletion pkg/files/docker/storj.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN --mount=type=cache,target=/var/lib/storj/go/pkg/mod,mode=777,uid=1000 \
--mount=type=cache,target=/var/lib/storj/.cache/go-build,mode=777,uid=1000 \
go install ./cmd/...

FROM --platform=$TARGETPLATFORM img.dev.storj.io/storjup/base:20230825-1 AS final
FROM --platform=$TARGETPLATFORM img.dev.storj.io/storjup/base:20231012-1 AS final
ENV STORJ_ADMIN_STATIC_DIR=/var/lib/storj/storj/satellite/admin/ui/build
ENV STORJ_CONSOLE_STATIC_DIR=/var/lib/storj/storj/web/satellite/
ENV STORJ_MAIL_TEMPLATE_PATH=/var/lib/storj/storj/web/satellite/static/emails
Expand Down
40 changes: 40 additions & 0 deletions pkg/files/docker/storjscan.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1.3
ARG TYPE
ARG SOURCE
FROM --platform=$TARGETPLATFORM img.dev.storj.io/storjup/build:20230627-1 AS base

FROM base AS commit
ARG BRANCH
ARG COMMIT
RUN git clone https://github.com/storj/storjscan.git --branch ${BRANCH}
RUN cd storjscan && git reset --hard ${COMMIT}
WORKDIR storjscan

FROM base AS branch
ARG BRANCH
RUN git clone https://github.com/storj/storjscan.git --depth=1 --branch ${BRANCH}
WORKDIR storjscan

FROM ${SOURCE} AS github

FROM base AS gerrit
ARG REF
RUN git clone https://github.com/storj/storjscan.git
WORKDIR storjscan
RUN git fetch https://review.dev.storj.io/storj/storjscan ${REF} && git checkout FETCH_HEAD

FROM base AS local
ARG PATH
WORKDIR /var/lib/storj/storjscan
COPY --chown=storj ${PATH} .

FROM --platform=$TARGETPLATFORM ${TYPE} AS binaries
RUN --mount=type=cache,target=/var/lib/storj/go/pkg/mod,mode=777,uid=1000 \
--mount=type=cache,target=/var/lib/storj/.cache/go-build,mode=777,uid=1000 \
go install ./cmd/...
RUN go install github.com/elek/cethacea@main

FROM img.dev.storj.io/storjup/base:20231012-1 AS final
COPY --from=binaries /var/lib/storj/go/bin /var/lib/storj/go/bin


0 comments on commit f57c59b

Please sign in to comment.