Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/pr-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Containerfile
file: src/Containerfile

- name: Generate GHCR artifact attestation
uses: actions/attest-build-provenance@v1
Expand All @@ -137,8 +137,8 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Containerfile
file: src/Containerfile

- name: Generate QA UI Quay artifact attestation
uses: actions/attest-build-provenance@v1
with:
Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Containerfile.ps
file: pathservice/Containerfile

- name: Generate QA PS GHCR artifact attestation
uses: actions/attest-build-provenance@v1
Expand All @@ -288,8 +288,8 @@ jobs:
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
file: Containerfile.ps
file: pathservice/Containerfile

- name: Generate QA PS Quay artifact attestation
uses: actions/attest-build-provenance@v1
with:
Expand Down
Binary file removed Containerfile.ps
Binary file not shown.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ yaml-lint: ## Lint yaml files
$(CMD_PREFIX) yamllint -c .yamllint.yaml deploy --strict

##@ Artifacts - Command to build and publish artifacts
ui-image: Containerfile ## Build continaer image for the InstructLab UI
$(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docker]"
$(CMD_PREFIX) docker build -f Containerfile -t ghcr.io/instructlab/ui/ui:$(TAG) .
ui-image: src/Containerfile ## Build container image for the InstructLab UI
$(ECHO_PREFIX) printf " %-12s src/Containerfile\n" "[docker]"
$(CMD_PREFIX) docker build -f src/Containerfile -t ghcr.io/instructlab/ui/ui:$(TAG) .
$(CMD_PREFIX) docker tag ghcr.io/instructlab/ui/ui:$(TAG) ghcr.io/instructlab/ui/ui:main

ps-image: Containerfile.ps ## Build continaer image for the pathservice
$(ECHO_PREFIX) printf " %-12s Containerfile.ps\n" "[docker]"
$(CMD_PREFIX) docker build -f Containerfile.ps -t ghcr.io/instructlab/ui/pathservice:$(TAG) .

ps-image: pathservice/Containerfile ## Build container image for the InstructLab PathService
$(ECHO_PREFIX) printf " %-12s pathservice/Containerfile\n" "[docker]"
$(CMD_PREFIX) docker build -f pathservice/Containerfile -t ghcr.io/instructlab/ui/pathservice:$(TAG) .
$(CMD_PREFIX) docker tag ghcr.io/instructlab/ui/pathservice:$(TAG) ghcr.io/instructlab/ui/pathservice:main

##@ Local Dev - Local machine based deployment of the UI stack
Expand Down
20 changes: 20 additions & 0 deletions pathservice/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM registry.access.redhat.com/ubi9/go-toolset:1.22.5-1730550521 as builder

WORKDIR /opt/app-root/src

COPY ./pathservice ./

# Build the Go app
RUN go build -o bin/pathservice

# Start a new stage from scratch
FROM registry.redhat.io/ubi9-micro@sha256:113775a4479af632fde314af652daa6a45ab3d34b59ceb76a777616131daa6bd

# Copy the binary from the previous stage
COPY --from=builder /opt/app-root/src/bin/pathservice /pathservice

# Expose the port 4000 to the outside world
EXPOSE 4000

# Command to run the executable
CMD ["/pathservice"]
4 changes: 2 additions & 2 deletions Containerfile → src/Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:22-alpine
FROM registry.access.redhat.com/ubi9/nodejs-22:9.5-1730543890

WORKDIR /app
WORKDIR /opt/app-root/src

COPY package*.json ./
RUN npm install
Expand Down