How do you comment out lines that you don't want to be processed by Docker Compose?

Experience Level: Senior
Tags: Docker Compose

Answer

Prepend the lines that you want to comment out by the # character.

version: "3.9"
services:
  my-service:
    #image: busybox:latest
    image: busybox:1.0.0

Comments

No Comments Yet.
Be the first to tell us what you think.
Docker Compose
Docker Compose

Are you learning Docker Compose ? Try our test we designed to help you progress faster.

Test yourself