Skip to content

Commit

Permalink
undo Dockerfile changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ggera committed Aug 20, 2024
1 parent afec45a commit bf168cf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,7 @@ jobs:

- name: Build Docker Images
run: |
cargo build --locked --release --features default
docker build -t kilt-node .
- name: Push Image - Commit SHA
if: github.ref_type == 'branch'
run: |
./.maintain/push-image.sh build "${{ env.CI_COMMIT_SHORT_SHA }}"
- name: Push Image - Latest Branch
if: github.ref_type == 'branch'
run: |
./.maintain/push-image.sh build "latest-${{ env.CI_COMMIT_BRANCH }}"
./.maintain/build-image.sh build
- name: Push Image - Tag
if: startsWith(github.ref, 'refs/tags/')
Expand Down
18 changes: 17 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# this container builds the kilt-parachain binary from source files and the runtime library
# pinned the version to avoid build cache invalidation

FROM paritytech/ci-unified:bullseye-1.70.0 as builder

WORKDIR /build

ARG FEATURES=default

COPY Cargo.toml Cargo.lock ./
COPY ./src ./src

RUN cargo build --locked --release --features $FEATURES

# ===== SECOND STAGE ======

FROM docker.io/library/ubuntu:20.04
LABEL description="This is the 2nd stage: a very small image where we copy the kilt-parachain binary."

ARG NODE_TYPE=kilt-parachain

COPY ./target/release/$NODE_TYPE /usr/local/bin/node-executable
COPY --from=builder /build/target/release/$NODE_TYPE /usr/local/bin/node-executable

RUN useradd -m -u 1000 -U -s /bin/sh -d /node node && \
mkdir -p /node/.local/share/node && \
Expand Down

0 comments on commit bf168cf

Please sign in to comment.