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

Bug report: Air gapped Install/Compile #1582

Open
SebastianThorn opened this issue May 24, 2023 · 0 comments
Open

Bug report: Air gapped Install/Compile #1582

SebastianThorn opened this issue May 24, 2023 · 0 comments
Labels

Comments

@SebastianThorn
Copy link

Describe the bug
Installing/Compiling without internet does not work as I suppose it is intended.

To Reproduce
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

  1. Clone repo to an Air gapped environment
  2. run npm install --production
  3. run npx grunt prod

Expected behaviour
A successful build resulting in files under build/prod/

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (if relevant, please complete the following information):

  • OS: Linux/docker
  • Browser: N/A
  • CyberChef version: 10.4.0

Additional context
What happens is that chromedriver is beeing pulled from the internet, even tho this is only needed for testing i assume.
npm install --production does not work because grunt is located in the dev-environment, but still needed to build the files.

I'm guessing that moving grunt to the regular dependencies would fix this.

Dockerfile that works, here we remove chromedriver while we build, this feels wrong.

#
# Set baseimage
FROM artifactory.example.org:8443/docker/node:18-alpine3.17 AS build

# Copy certificate
COPY ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

# Copy source-code
COPY src/. /src

# Set working-directory
WORKDIR /src

# Set environment
ENV NODE_OPTIONS="--max-old-space-size=2048"

# Run commands
RUN npm config set cafile /etc/ssl/certs/ca-certificates.crt && \
    npm config set registry https://artifactory.example.org:8443/artifactory/api/npm/npm/ && \
    npm uninstall -save-dev chromedriver && \
    npm install && \
    npx grunt prod

#
# Set image for webserver
FROM artifactory.example.org:8443/docker/nginxinc/nginx-unprivileged:1.23-alpine3.17 as web
COPY --from=build /src/build/prod /usr/share/nginx/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant