Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CICD-PATCH Correct Docker build Issues on Web #299

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

BronzBierd
Copy link
Contributor

@BronzBierd BronzBierd commented Jan 20, 2025

Pull Request for JIRA Ticket: ----SCV-459----

Issue ticket number and link

https://jag.gov.bc.ca/jira/browse/SCV-459

Description

  1. Due to Vue2.7 the NPM installation does not work on Root users, additionally assigning no user creates a permission error where package.*.json are not readable. This PR corrects those issues.
  2. There are a few updates in the notation for assigning permissions using chmod.
    • Note that I could not find a working example of using symbolic permission assignment using the Docker COPY --chmod option.

Multiple variations of the Dockerfile has been tested:

  1. Using no USER root statement - Manage build works locally, Fails in GH cannot read package.json
  2. Using USER 104 at the beginning of # 2. Build web-artifacts step - Manage build works locally, Fails in GH cannot read package.json
  3. Switching to USER 104 before npm install and back to USER root afterwards - Fails Docker build as 104 cannot read package.json
  4. Removing USER root statement and setting permissions on COPY statements - Works both Locally and in GH:

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Application builds and deploys correctly, with working scenario in websm and web:
Websm:
image

Web:
image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Other attempts have failed to remove the permissions
Add guiding comments
@BronzBierd BronzBierd requested a review from WadeBarnes January 21, 2025 18:26
@BronzBierd BronzBierd marked this pull request as ready for review January 21, 2025 22:11
@BronzBierd
Copy link
Contributor Author

BronzBierd commented Jan 21, 2025

@BronzBierd
Copy link
Contributor Author

@WadeBarnes, this is now ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant