Back to Cheat SheetsTooling · Intermediate
Docker cheat sheet
Images, containers, compose and running test suites in isolation.
Containers
Run
docker run --rm -p 8080:80 nginxList / logs
docker ps; docker logs -f <id>Shell in
docker exec -it <id> shImages
Build
docker build -t tests:local .Dockerfile
FROM mcr.microsoft.com/playwright:v1.49.0-jammy
WORKDIR /app
COPY . .
RUN npm ci
CMD ["npx","playwright","test"]Compose
Up / down
docker compose up -d && docker compose down -vRun suite
docker compose run --rm testsGo beyond the reference
Book a free demo class and apply these commands on live project work.