-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description This PR: - Sets some additional RFC standard LABELS to our Docker container - Upload the container to both GitHub and DockerHub registries (PRs do not upload to DH) - Minor Dockerfile efficiencies. It's a follow up from #1656
- Loading branch information
Showing
3 changed files
with
15 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,8 @@ on: | |
pull_request: | ||
paths: | ||
- ".github/workflows/build-docker.yml" | ||
- "docker/" | ||
- "docker/centrifuge-chain" | ||
- "docker/scripts" | ||
- ".dockerignore" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}${{ github.event_name }} | ||
|
@@ -33,11 +34,11 @@ jobs: | |
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 #v3 | ||
|
||
# - name: DockerHub Registry Login | ||
# uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
# with: | ||
# username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
# password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
- name: DockerHub Registry Login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- name: Github Registry login | ||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d | ||
|
@@ -61,6 +62,12 @@ jobs: | |
type=ref,event=tag,suffix=-{{sha}}-${{ env.NOW }},prefix=${{ matrix.target == 'test' && 'test-' || '' }} | ||
type=ref,event=pr,suffix=-{{sha}}-${{ env.NOW }},prefix=${{ matrix.target == 'test' && 'test-' || '' }}PR | ||
type=ref,event=branch,prefix=${{ matrix.target == 'test' && 'test-' || '' }},suffix=-{{sha}}-${{ env.NOW }} | ||
labels: | | ||
org.opencontainers.image.vendor="K/F Labs" \ | ||
org.opencontainers.image.authors="[email protected]" \ | ||
org.opencontainers.image.documentation="https://github.com/centrifuge/centrifuge-chain/blob/main/README.md" \ | ||
org.opencontainers.image.base.name="ubuntu/jammy" \ | ||
org.opencontainers.image.base.digest="ubuntu@sha256:6042500cf4b44023ea1894effe7890666b0c5c7871ed83a97c36c76ae560bb9b" | ||
- name: Configure GHA cache | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v6 | ||
|
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 |
---|---|---|
|
@@ -29,23 +29,6 @@ FROM --platform=linux/amd64 docker.io/paritytech/ci-linux:production as builder | |
FROM --platform=linux/amd64 docker.io/library/ubuntu:jammy | ||
ARG BUILD_DATE | ||
ARG VERSION | ||
# Standard OCI labels | ||
# https://github.com/opencontainers/image-spec/blob/main/annotations.md | ||
LABEL io.centrifuge.image.vendor="Centrifuge" \ | ||
org.opencontainers.image.created= \ | ||
org.opencontainers.image.authors="[email protected]" \ | ||
org.opencontainers.image.title="centrifugeio/centrifuge-chain" \ | ||
org.opencontainers.image.description="Centrifuge, the layer 1 of RWA. This is the official Centrifuge (para)chain image" \ | ||
org.opencontainers.image.source="https://github.com/centrifuge/centrifuge-chain/" \ | ||
org.opencontainers.image.created="${BUILD_DATE}" \ | ||
org.opencontainers.image.documentation="https://github.com/centrifuge/centrifuge-chain/blob/main/README.md" \ | ||
org.opencontainers.image.version="$VERSION" \ | ||
org.opencontainers.image.licenses="GPL-3" \ | ||
org.opencontainers.image.base.name="ubuntu/jammy" \ | ||
org.opencontainers.image.base.digest="ubuntu@sha256:6042500cf4b44023ea1894effe7890666b0c5c7871ed83a97c36c76ae560bb9b" | ||
# org.opencontainers.image.url= \ | ||
|
||
|
||
|
||
RUN apt-get update && apt-get install -y curl jq | ||
RUN apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
@@ -57,6 +40,8 @@ FROM --platform=linux/amd64 docker.io/library/ubuntu:jammy | |
COPY --from=builder /centrifuge-chain/target/release/centrifuge-chain /usr/local/bin/ | ||
|
||
COPY docker/scripts /centrifuge/scripts | ||
# The following will make everything under /centrifuge/scripts reachable from PATH | ||
# by creating a symbolic link into /usr/local/bin | ||
RUN chmod +x /centrifuge/scripts/* && \ | ||
ln -s /centrifuge/scripts/* /usr/local/bin/ | ||
|
||
|
This file was deleted.
Oops, something went wrong.