Skip to content

Specify unrunnable service #3684

Description

@jylin

Supposed I have a docker-compose.yml file like this:

version: '2'
services:
        base:
                build: ./base
                image: my-base
        service:
                container_name: my-service
                build: ./service
                image: my-service
                ports:
                        - 80:80

I mainly keep the "base" target in my compose file as a convenient way to build everything. In other words, I'm sort of using docker-compose.yml as a Makefile. This way I can just do docker-compose up --build to rebuild and re-run everything. However, the base image doesn't have an entrypoint, so if you run it, then it will quit right away. It would be nice if there were some way to specify that a service is not runnable so that compose doesn't even try to start it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions