cypress-io/cypress-example-docker-compose

If build is used in docker-compose then image: can be omitted

030 opened this issue · 2 comments

030 commented

If build: is used in docker-compose then image: can be omitted

You mean

services:
  web:
    image: apache
    build: ./webapp
	...
  e2e:
    image: cypress
    build: ./e2e

image is Docker image, and build if the folder, no?

If you specify both, then it will build an image using the build context specified and name/tag it according to the image name. It's fine to have both.

https://docs.docker.com/compose/compose-file/#build