Bug report: Air gapped Install/Compile
- Dominant language
- JavaScript
- Stars
- 35.8k
- Forks
- 4.1k
- Avg merge
- 2d 26m
- Merged PRs (30d)
- 33
Description
**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.
```dockerfile
#
# 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
```
Contributor guide
Assessment
This issue has not been assessed yet.