Skip to content

Build Image

Evil Wizard edited this page Feb 10, 2023 · 11 revisions

No Cache

Build the Docker Image without using cached versions of previous image build stages.

sudo docker build \
    -f php-5-6-apache.Dockerfile \
    --target php-5-6-build \
    --no-cache \
    -t php-5-6-apache:latest \
    .

Notes

  • Using -f php-5-6-apache.Dockerfile

    To specify the filename to build otherwise it is expected to be named Dockerfile.

  • Using --target php-5-6-build

    To select the build target stage from the Dockerfile, used mostly in Multi Stage image builds.

Clone this wiki locally