How to use the Dockerfile Generator.
A Dockerfile draft must fit the app's runtime and build process. Check dependency installation, exposed ports and what files enter the image.
Make the workflow fit your task.
Specify the application's runtime, build artifacts and startup command, then draft an image that includes only the required files. Review dependency installation, user and port assumptions and test the build in its intended environment.
- What you provide
- Application stack and deployment requirements.
- What you get
- Dockerfile draft with dependencies and assumptions.
See the input and the result.
Illustrative input and output · a teaching example, not a live WebAct run
Example input
Draft a Dockerfile for a plain Node 24 service with package-lock.json, npm start, no build step, port 3000 and server binding to 0.0.0.0. Only source file is server.js; runtime needs no filesystem writes.
Completed example
FROM node:24-alpine WORKDIR /app COPY package.json package-lock.json ./ RUN npm ci --omit=dev COPY server.js ./server.js ENV NODE_ENV=production USER node EXPOSE 3000 CMD ["npm", "start"] Build and test in your environment. Only the declared runtime files enter this image. EXPOSE documents the port; publish it explicitly when running the container. A production release should pin a reviewed image digest.
Load this input into the prompt, then copy it to WebAct to try the task. Your result may differ from the illustration.
Decisions and troubleshooting.
Does EXPOSE publish a container port automatically?
It documents the intended port; actual publishing is configured when the container runs. Keep image and runtime configuration distinct.
Why does the container start but remain unreachable?
Check the application's bind address, actual listening port and run-time port mapping. A correct Dockerfile cannot compensate for every runtime mismatch.
Try it with your own source.
Replace the example with your material in the task prompt. Keep the requirements you need, then copy the task into WebAct.
Customize and copy the task ↑