0

How to specify the image version if the Dockerfile is available as part of folder foo and we use the build option to build it in docker-compose.yaml file. It says "latest" otherwise, but we want to specify something like 0.0.1

  foo-gateway:
    container_name: "foo-gateway"
    build: foo
    ports:
      - 9000:80
      - 9090:8080

foo/dockerfile
0

1 Answer 1

1

You can provide the image name:

  foo-gateway:
    container_name: "foo-gateway"
    image: foo:0.0.1
    build: foo
    ports:
      - 9000:80
      - 9090:8080
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.