-
Notifications
You must be signed in to change notification settings - Fork 0
Build Image
Build the Docker Image without using cached versions of previous image build stages.
sudo docker build \
-f php-5-6-apache.Dockerfile \
--target build-php-56-apache \
--no-cache \
--build-arg NPM_VERSION=6.4.1 \
-t php-5-6-apache:latest \
.-
Using
-f php-5-6-apache.DockerfileTo specify
php-5-6-apache.Dockerfileas the filename to build otherwise it is expected to be named justDockerfile. -
Using
--target build-php-56-apacheTo select the build target stage[^multi_stage_builds_note] from the Dockerfile.
-
Using
--no-cacheTo prevent using previous cached versions of image build stages.
-
Using
--build-arg NPM_VERSION=6.4.1To set build arguments & values to use during the build process.
NPM_VERSION=6.4.1sets the Node Version to be used to 6.4.1 when rebuilding the image. -
Using
-t php-5-6-apache:latestTo name & tag the locally built docker image.
-
Using
.To set the current location as the build context for the build process.