Toolvito

Docker Configuration Editor

Paste a docker compose file to check it and lay it out neatly, turn a docker run command into a Compose service (or a service back into docker run), check a Dockerfile for common mistakes, or write a healthcheck. Everything happens in your browser; nothing is built or run.

Check a Compose file

docker run and Compose

Check a Dockerfile

Write a healthcheck

Durations are like 30s, 1m30s or 500ms. Docker’s own defaults are every 30s, a 30s time limit, 3 failures and no start period.

How to check a Compose file

  1. Paste the compose.yaml (or docker-compose.yml) or select Open a file. It is checked as you type.
  2. Read the findings; select line … to jump to the line.
  3. Select Lay it out to fix the indentation. Comments, quotes and anchors are kept, and the meaning does not change.

What is checked in a Compose file

  • Top-level elements and every service attribute, as listed in the Compose file reference (a name that is not there is a warning; x- extension fields are allowed). version is obsolete and only noted.
  • Each service has image or build; ports are like 8080:80, 127.0.0.1:8080:80 or 53:53/udp and no host port is used twice; named volumes, networks, secrets and configs are declared at the top.
  • depends_on names services of the file, without circles; condition is service_started, service_healthy or service_completed_successfully, and a service_healthy dependency has a healthcheck.
  • restart, pull_policy, healthcheck keys and durations (30s, 1m30s), duplicate environment variables, container_name with more than one replica, and network_mode together with networks.

docker run and Compose

Paste a docker run command and select Make Compose: every flag the converter knows becomes a service attribute, named volumes and networks are declared, and flags with no Compose setting (such as --rm and -d) are explained. Make docker run turns a service of the Compose file above back into one docker run command; attributes that docker run cannot take (build, depends_on, deploy) are listed.

What is checked in a Dockerfile

  • Instructions are known, FROM comes first, images have a version tag (not :latest), stage names are unique and COPY --from names an earlier stage.
  • CMD and ENTRYPOINT: a broken exec form (single quotes) runs in a shell; the shell form does not pass stop signals; a second CMD replaces the first.
  • apt-get update and install in the same RUN, -y, --no-install-recommends and removing the package lists; cd in its own RUN (use WORKDIR); sudo; pipes without set -o pipefail; ADD where COPY is enough; MAINTAINER; EXPOSE ports; the final stage running as root.

Limits you should know

  • The checks follow the published rules; they do not pull images, read build contexts, or run docker compose config. Files from include: and extends: in other files are not opened.
  • The Dockerfile checks are a subset of what a full linter such as hadolint finds.

Related tools