Pikkola Docker, tool No. 63

A Dockerfile that fits the app, not the tutorial.

Pick the stack, the build and the extras, and copy a Dockerfile with the multi-stage split, a non-root user, a health check and cache mounts already in the right order. The same bench writes the .dockerignore. A compose file puts a database, a cache and a proxy around it, and the audit names every line of an old Dockerfile that will cost you later.

6
stacks
3
benches
0
uploads

The studio

Three benches, one container

Build, compose, audit. Each bench writes a file you can copy or download, and neither of them sends it anywhere.

Stack

Node.js runs dist/server.js, Next.js reads the standalone output, Python runs uvicorn, Go builds ./cmd/server, Rust builds the Cargo target and Nginx serves a built dist.

Build
Base
Install
Start
File

            
Nothing leaves the tab

No request, no account, no storage. The Content-Security-Policy sets connect-src to none, so the page could not upload a file even if it tried.

Why the file comes out in this order

A Dockerfile is a cache key with a shell attached. The order of the lines decides what has to run again when one file changes.

01

Dependencies first, source second

The manifest and lockfile are copied and installed before the source arrives, so editing a component does not reinstall the tree. The multi-stage split carries the compiler only as far as the build.

02

The defaults are the safe ones

A pinned base tag, a non-root user, a health check that fails when the process is up but the app is not, and cache mounts that survive a rebuild. Turn one off and the file shows exactly what you gave up.

03

The audit reads like the builder

Instructions are joined across continuation lines and read one by one, so a finding knows which instruction it sits in. That is how COPY . . before the install is caught, and why a RUN split in two is caught as well.

What the audit looks for

Eight rules about the file, each with the line it starts on. Two of them are errors, the rest are warnings and notes, and a clean file earns nothing at all.

It reads the file, not the build. Whether the image runs, which port the network reaches and what your .dockerignore leaves out are outside what a text file can say.

  • FROM
    A tag that moveslatest, or no tag at all, means the base can change under a build you did not touch. A version tag or a digest can be reproduced.
  • USER
    Root inside the containerNo USER instruction means root. Docker drops capabilities, but root still writes anywhere the mount allows, and that is the process a break out aims at.
  • RUN
    Package lists left behindapt-get install without removing /var/lib/apt/lists in the same RUN leaves tens of megabytes in the layer, and a later RUN cannot take them out again.
  • CACHE
    apt-get update in its own RUNThe update layer stays cached while the install layer is rebuilt, so an install can run against a stale index and pick up a package version you did not choose.
  • COPY
    COPY . . before the installThe source copy changes on every edit, so every instruction after it runs again, the install included. That is the difference between a two second rebuild and a two minute one.
  • ENV
    A secret in ENV or ARGA password in ENV is in the image history and in docker inspect, for anyone who can pull it. Values are checked, and a name that reads like a secret with a literal value is an error.
  • ADD
    ADD where COPY would doADD unpacks a local archive and fetches a URL, so what lands in the image depends on the source. COPY copies, which is what you meant.
  • RUN
    curl piped into shThe script, its version and its signature are whatever the network returns during the build. Download it, check it, then run it.

Questions

Is anything uploaded?

No. The generators are functions in a JavaScript file on this domain, and the page's Content-Security-Policy sets connect-src to none, so a request has nowhere to go. Load the page once and it keeps working with the network off.

Does the generated Dockerfile build?

It is a starting file, not a verified build. Every path it names, such as dist/server.js, app.main:app, ./cmd/server or the Cargo target, is the convention of that stack. Rename yours and change that one line. Your application was not run here.

Why pin the base image to a minor version?

node:22-bookworm-slim and its siblings are chosen because the tag names a version rather than latest. A base that moves under you cannot be reproduced, which is the first thing the audit reports. Bump the tag when you mean to.

Is the compose file enough to run the stack?

It is the wiring: build, ports, restart policy, depends_on with a health condition, named volumes, and a health check for the app itself. The app still needs its environment in .env, and a proxy needs the nginx.conf that the second tab writes beside it.

What does the audit not see?

It reads text, so it cannot tell whether the runtime really needs curl, whether the port is reachable, or what your .dockerignore leaves out. It checks the file, not the build.

Which instruction set does it build against?

The Dockerfile reference as it stands in 2026: FROM, WORKDIR, COPY, ADD, RUN, ENV, ARG, USER, EXPOSE, HEALTHCHECK, ENTRYPOINT and CMD. Cache mounts come in through the syntax line, and the audit reads the same set of instructions.