-
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-7-2-fpm.Dockerfile \
--target build-php-7-2-fpm \
--build-arg APP_ENV=local \
--build-arg NPM_VERSION=7.24.2 \
--no-cache \
-t php-7-2-fpm:latest \
.
-
Using
-f php-7-2-fpm.Dockerfile
To specify
php-7-2-fpm.Dockerfile
as the filename to build otherwise it is expected to be named justDockerfile
. -
Using
--target build-php-7-2-fpm
To select the build target stage[^multi_stage_builds_note] from the Dockerfile.
-
Using
--no-cache
To prevent using previous cached versions of image build stages.
-
Using
--build-arg NPM_VERSION=7.24.2
To set build arguments & values to use during the build process.
NPM_VERSION=7.24.2
sets the Node Version to be used to 7.24.2 when rebuilding the image. -
Using
-t php-7-2-fpm:latest
To name & tag the locally built docker image.
-
Using
.
To set the current location as the build context for the build process.