Use a Build Secret Instead of ARG
Labs have no container engine, so nothing is built or started: your files are checked by reading them, the way a reviewer or a CI linter would. docker-compose config (to validate Compose files) and hadolint (a Dockerfile linter) are installed.
The Dockerfile in /home/student/projects/search-api installs packages from a private npm registry. It receives the token with --build-arg NPM_TOKEN=…, which stores the token in the image metadata (docker history shows it) and in an .npmrc layer.
Rewrite the Dockerfile so that:
ARG or ENV, and is never written into a file that stays in the imagenpm ci gets the token from a BuildKit secret with id npm_token, mounted only for that RUNdocker build --secret id=npm_token,env=NPM_TOKEN .About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Your machine is ready to start
Create a free account to open a machine and get graded.