-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix antora content image to use nodejs 20 UBI and observe git ref
- Loading branch information
Wolfgang Kulhanek
authored and
Wolfgang Kulhanek
committed
Dec 14, 2023
1 parent
6f1564f
commit f8c30ac
Showing
3 changed files
with
48 additions
and
48 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 |
---|---|---|
@@ -1,38 +1,39 @@ | ||
# Use Red Hat UBI9 as the base image | ||
# No AuthN necessary to this docker registry | ||
FROM registry.access.redhat.com/ubi9 | ||
FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/nodejs-20:latest | ||
|
||
# Copy the entrypoint script into the container | ||
COPY ./entrypoint.sh /entrypoint.sh | ||
USER root | ||
|
||
# Install necessary tools | ||
RUN dnf install --quiet -y \ | ||
RUN dnf -y update && dnf -y upgrade && \ | ||
dnf -y --quiet install \ | ||
git \ | ||
nodejs \ | ||
wget && \ | ||
dnf clean all | ||
dnf clean all && \ | ||
rm -rf /var/cache/yum /root/.cache | ||
|
||
RUN wget -q https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \ | ||
-O /usr/bin/yq && chmod +x /usr/bin/yq | ||
|
||
|
||
RUN npm install --quiet -g gulp @antora/cli @antora/site-generator | ||
RUN npm install -g gulp @antora/cli @antora/site-generator | ||
|
||
# Create a user named 'antora' | ||
# RUN useradd -ms /bin/bash antora | ||
RUN useradd -u 1001 -ms /bin/bash antora && \ | ||
RUN useradd -ms /bin/bash antora && \ | ||
mkdir -p /antora && \ | ||
chown -R antora:antora /antora | ||
|
||
# Copy the entrypoint script into the container | ||
COPY ./entrypoint.sh /entrypoint.sh | ||
|
||
# Make the entrypoint script executable | ||
RUN chmod +x /entrypoint.sh | ||
|
||
# Change ownership of the entrypoint script to the antora user | ||
RUN chown antora:antora /entrypoint.sh | ||
# Make the entrypoint script executable and change ownership | ||
RUN chmod +x /entrypoint.sh && \ | ||
chown antora:antora /entrypoint.sh | ||
|
||
# Switch to the 'antora' user | ||
USER antora | ||
|
||
EXPOSE 80 | ||
|
||
# Set the entrypoint script as the command to run when the container starts | ||
ENTRYPOINT ["/entrypoint.sh"] |
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 |
---|---|---|
@@ -1,38 +1,33 @@ | ||
IMAGE_NAME = showroom-builder | ||
IMAGE_NAME = showroom-builder | ||
REGISTRY = docker.io/tonykay | ||
CONTAINER_RUNTIME = podman | ||
ARCH = x86_64 | ||
|
||
|
||
REGISTRY = docker.io/tonykay | ||
CONTAINER_RUNTIME = podman | ||
ARCH = x86_64 | ||
|
||
CONTAINER_HOSTNAME = antora | ||
# RHEL_VERSION = 8.5 | ||
# SSH_PORT = 2222 | ||
# SHELL_COMMAND = sudo su - devops | ||
CONTAINER_HOSTNAME = antora | ||
# RHEL_VERSION = 8.5 | ||
# SSH_PORT = 2222 | ||
# SHELL_COMMAND = sudo su - devops | ||
|
||
# Used instead of docker run.... bash | ||
|
||
: ## TIP! make supports tab completion with *modern* shells e.g. zsh etc | ||
: ## | ||
|
||
help: ## Show this help - technically unnecessary as `make` alone will do | ||
@egrep -h '\s##\s' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
@egrep -h '\s##\s' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
|
||
build-x86 : ## Do a docker based build | ||
build-x86 : ## EXTRA_ARGS='--squash --no-cache' for example | ||
docker build \ | ||
-f Containerfile \ | ||
docker build \ | ||
-f Containerfile \ | ||
--platform linux/amd64 \ | ||
--tag $(REGISTRY)/$(IMAGE_NAME):$${VERSION:-latest} \ | ||
--load \ | ||
$(EXTRA_ARGS) . | ||
|
||
build-multi : ## Do a docker based build | ||
build-multi : ## EXTRA_ARGS='--squash --no-cache' for example | ||
docker buildx build \ | ||
docker buildx build \ | ||
--platform linux/arm64/v8,linux/amd64 \ | ||
--tag $(REGISTRY)/$(IMAGE_NAME):$${VERSION:-latest} \ | ||
$(EXTRA_ARGS) . | ||
|
||
|
||
# --push \ |
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