Skip to content

Commit

Permalink
Update dockerfile for parcel/watcher package fix (#110)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
thepetk and Jdubrick authored Dec 1, 2023
1 parent 35324bf commit 163464e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ Owners of the repository will watch out for and review new PRs.
If comments have been given in a review, they have to be addressed before merging.

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.

## Troubleshooting

- 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`.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal AS deps
USER root

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

# Project non-specific args
ARG PROJECT_NAME
Expand Down
3 changes: 2 additions & 1 deletion scripts/build_viewer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ set -eux

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

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

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

0 comments on commit 163464e

Please sign in to comment.