Skip to content

Commit 163464e

Browse files
thepetkJdubrick
andauthored
Update dockerfile for parcel/watcher package fix (#110)
* Update dockerfile for parcel/watcher package fix Signed-off-by: thepetk <[email protected]> * Add make to installed deps Signed-off-by: thepetk <[email protected]> * Downgrade watcher to 2.1.0 Signed-off-by: thepetk <[email protected]> * add env var for arm64 support and update docs Signed-off-by: Jordan Dubrick <[email protected]> --------- Signed-off-by: thepetk <[email protected]> Signed-off-by: Jordan Dubrick <[email protected]> Co-authored-by: Jordan Dubrick <[email protected]>
1 parent 35324bf commit 163464e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ Owners of the repository will watch out for and review new PRs.
3939
If comments have been given in a review, they have to be addressed before merging.
4040

4141
After addressing review comments, don’t forget to add a comment in the PR afterward, so everyone gets notified by Github and knows to re-review.
42+
43+
## Troubleshooting
44+
45+
- There is a known issue with Apple Silicon (arm64) architectures that may cause the `build_viewer.sh` script to fail. If this issue occurs first run `export PLATFORM_EV=linux/arm64`.

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal AS deps
1717
USER root
1818

19-
# Install yarn
19+
# Install yarn & node-gyp dependency
2020
RUN \
2121
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo && \
22-
microdnf install -y yarn
22+
microdnf install -y yarn python3 gcc-c++ make && \
23+
npm install --build-from-resource node-gyp
2324

2425
# Project non-specific args
2526
ARG PROJECT_NAME

scripts/build_viewer.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ set -eux
1818

1919
ABSOLUTE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2020
BUILD_DIR=$ABSOLUTE_PATH/..
21+
PLATFORM_EV=${PLATFORM_EV:-"linux/amd64"}
2122

2223
# Set Docker/Podman alias if necessary
2324
. ${ABSOLUTE_PATH}/setenv.sh
2425

25-
docker build --no-cache -t registry-viewer $BUILD_DIR \
26+
docker build --platform ${PLATFORM_EV} --no-cache -t registry-viewer $BUILD_DIR \
2627
--build-arg PROJECT_NAME=registry-viewer \
2728
--build-arg NEXT_PUBLIC_BASE_PATH=${NEXT_PUBLIC_BASE_PATH:-"/viewer"}

0 commit comments

Comments
 (0)