IMB
IMB

Reputation: 15909

Automatically build latest PHP patch version in Docker?

Dockerfile containsFROM php:7.3-apache-stretch.

How to tell Docker to automatically build 7.3.1 from Docker Hub (latest patch version as of this writing) when I run the build command?

E.g., Next time when PHP is 7.3.2, I simply run build without specifying specific patch version or apt-get update....

Upvotes: 1

Views: 603

Answers (1)

wodka
wodka

Reputation: 1390

When you look at the tags -> php:7.3-apache-stretch will always be the latest of the 7.3.x branch.

to rebuild for a new version you have to rebuild your image (it will then automatically take the latest version of the tag)

docker build --pull .

for docker compose it is not possible to automatically pull new images -> so you have to call docker pull YOUR_BASE_IMAGE before

docker-compose up --build

Upvotes: 1

Related Questions