Zuriar
Zuriar

Reputation: 11734

Name an image built from running a docker-compose file

If I run this docker-compose.yml:

version: '2'
services:
   kibana:
      build: ./kibana

how can I specify the name of the resulting image which is built? At present it just defaults to the directory name plus the service.

Upvotes: 2

Views: 3976

Answers (1)

dnephin
dnephin

Reputation: 28040

Use image: to set a name for the image.

version: '2'
services:
    kibana:
        image: example/imagename:latest
        build: ./kibana

Upvotes: 5

Related Questions