Skip to content

Commit d50d407

Browse files
authored
Merge pull request #150 from BitGo/WP-00000-fix-ghcr-release
fix: use correct sha digest to fix docker build
2 parents eb044be + 356cbb4 commit d50d407

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

.github/workflows/pull_request.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,27 @@ jobs:
1717
uses: ./.github/workflows/build-and-test.yaml
1818
secrets:
1919
fossa-api-key: ${{ secrets.FOSSA_API_KEY }}
20+
21+
build-docker-image:
22+
name: Build the Docker Image
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Build and push Docker image
32+
uses: docker/build-push-action@v6
33+
with:
34+
context: .
35+
push: false
36+
tags: |
37+
ghcr.io/bitgo/advanced-wallets:${{ github.sha }}
38+
build-args: |
39+
BUILD_VERSION=${{ github.sha }}
40+
BUILD_DATE=${{ github.event.repository.updated_at }}
41+
VCS_REF=${{ github.sha }}
42+
cache-from: type=gha
43+
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# syntax=docker/dockerfile:1.4
22

33
# Build stage
4-
# Using node:22-alpine with OpenSSL 3.3.2+ to address CVE-2024-6119
5-
# Pinned to specific SHA256 digest for supply chain security and deterministic builds
6-
# To update: podman pull node:22-alpine && podman inspect node:22-alpine --format '{{index .RepoDigests 0}}'
7-
# Last updated: 2025-10-24
8-
FROM node:22-alpine@sha256:d31216005bd330aa47f848822d4f269f6c79f0905b60cca1d87577149519daa6 AS builder
4+
# Using node:22.1.0-alpine with OpenSSL 3.3.2+ to address CVE-2024-6119
5+
# Pinned to AMD64-specific SHA256 digest for supply chain security and deterministic builds
6+
# To update: docker pull --platform linux/amd64 node:22.1.0-alpine && docker inspect --format='{{index .RepoDigests 0}}' node:22.1.0-alpine
7+
FROM node:22.1.0-alpine@sha256:487dc5d5122d578e13f2231aa4ac0f63068becd921099c4c677c850df93bede8 AS builder
98

109
# Set build-time variables for reproducibility
1110
ARG NODE_ENV=development
@@ -55,9 +54,9 @@ COPY . .
5554
RUN npm run build
5655

5756
# Production stage
58-
# Using node:22-alpine with OpenSSL 3.3.2+ to address CVE-2024-6119
59-
# Pinned to specific SHA256 digest for supply chain security and deterministic builds
60-
FROM node:22-alpine@sha256:d31216005bd330aa47f848822d4f269f6c79f0905b60cca1d87577149519daa6 AS production
57+
# Using node:22.1.0-alpine with OpenSSL 3.3.2+ to address CVE-2024-6119
58+
# Pinned to AMD64-specific SHA256 digest for supply chain security and deterministic builds
59+
FROM node:22.1.0-alpine@sha256:487dc5d5122d578e13f2231aa4ac0f63068becd921099c4c677c850df93bede8 AS production
6160

6261
# Declare build arguments in production stage
6362
ARG PORT=3081

0 commit comments

Comments
 (0)