Skip to content

Commit

Permalink
Dockerfile updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Madigan <[email protected]>
  • Loading branch information
jasonmadigan committed Oct 22, 2024
1 parent b391657 commit c72248c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Push Image
name: Build and Push Multi-Arch Image

on:
push:
Expand All @@ -12,7 +12,7 @@ env:

jobs:
build:
name: Build and push image
name: Build and push multi-arch image
runs-on: ubuntu-22.04

steps:
Expand All @@ -25,14 +25,17 @@ jobs:

- uses: actions/checkout@v4

- name: Build Image
- name: Build Multi-Arch Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: quay.io/kuadrant/console-plugin
tags: |
latest
${{ github.sha }}
archs: |
amd64
arm64
containerfiles: |
./Dockerfile
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Push Versioned Image
name: Build and Push Versioned Multi-Arch Image

on:
release:
Expand All @@ -11,7 +11,7 @@ env:

jobs:
release:
name: Build and push versioned image
name: Build and push versioned multi-arch image
runs-on: ubuntu-22.04

steps:
Expand All @@ -27,13 +27,16 @@ jobs:

- uses: actions/checkout@v4

- name: Build Image for Release
- name: Build Multi-Arch Image for Release
id: build-release-image
uses: redhat-actions/buildah-build@v2
with:
image: quay.io/kuadrant/console-plugin
tags: |
${{ github.event.release.name }}
archs: |
amd64
arm64
containerfiles: |
./Dockerfile
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
FROM registry.access.redhat.com/ubi9/nodejs-20 AS build
FROM registry.access.redhat.com/ubi9/nodejs-20:latest AS build
USER root
RUN command -v yarn || npm i -g yarn
RUN dnf update -y && dnf upgrade -y && \
command -v yarn || npm i -g yarn

ADD . /usr/src/app
WORKDIR /usr/src/app
RUN yarn install && yarn build

FROM registry.access.redhat.com/ubi9/nginx-124:1-10
FROM registry.access.redhat.com/ubi9/nginx-124:latest
USER root
RUN dnf update -y && dnf upgrade -y

COPY --from=build /usr/src/app/dist /usr/share/nginx/html

Expand Down

0 comments on commit c72248c

Please sign in to comment.