-
Notifications
You must be signed in to change notification settings - Fork 1
Build Image
Evil Wizard edited this page Mar 9, 2023
·
3 revisions
Build the Docker Image without using cached versions of previous image build stages.
sudo docker build \
-f php-7-4-apache.Dockerfile \
--target php-7-4-build \
--build-arg APP_ENV=local \
--build-arg NPM_VERSION=7.24.2 \
--no-cache \
-t php-7-4-web-server:latest \
.-
Using
-f php-7-4-apache.DockerfileTo specify the filename to build otherwise it is expected to be named
Dockerfile. -
Using
--target php-7-4-buildTo select the build target stage from the Dockerfile, used mostly in Multi Stage image builds.
-
Using
--build-arg ARG=valueTo set build argument values to use.