-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storjscan.Dockerfile: Add storjscan dockerfile for remote builds
Add the required dockerfile to allow for remote builds of the storjscan service via github and/or gerrit. Also some slight updates to the remote command to use the addfiles function to grab the appropriate dockerfile for the service to build instead of always extracting all dockerfiles. Change-Id: I2543a57abb095a289c4d9de28d74016d9cf6db14
- Loading branch information
1 parent
bb54824
commit ad9e370
Showing
7 changed files
with
89 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# syntax=docker/dockerfile:1.3 | ||
ARG TYPE | ||
FROM --platform=$TARGETPLATFORM img.dev.storj.io/storjup/build:20220803-2 AS base | ||
|
||
FROM base AS github | ||
ARG BRANCH | ||
RUN git clone --depth=1 https://github.com/storj/storjscan.git --branch ${BRANCH} | ||
WORKDIR storjscan | ||
|
||
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 --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/... | ||
|
||
FROM img.dev.storj.io/storjup/base:20220901-3 AS final | ||
|
||
COPY --from=binaries /var/lib/storj/go/bin /var/lib/storj/go/bin | ||
COPY --from=binaries --chown=storj /var/lib/storj/entrypoint.sh /var/lib/storj/entrypoint.sh | ||
|
||
ENTRYPOINT ["/var/lib/storj/entrypoint.sh"] | ||
ENV PATH=$PATH:/var/lib/storj/go/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters