cypress-example-docker-compose icon indicating copy to clipboard operation
cypress-example-docker-compose copied to clipboard

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

Open 030 opened this issue 6 years ago • 2 comments

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

030 avatar Apr 09 '19 10:04 030

You mean

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

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

bahmutov avatar Apr 21 '20 14:04 bahmutov

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

sidewaysgravity avatar Nov 06 '20 06:11 sidewaysgravity