Use ARG instead of ENV in Dockerfiles for variables that are only needed during build.

This commit is contained in:
Michael Stenta 2020-04-16 20:37:49 -04:00
parent 4fda841b34
commit 3501c4c9df
2 changed files with 4 additions and 4 deletions

View File

@ -1,9 +1,9 @@
# Inherit from the Drupal 7 image on Docker Hub. # Inherit from the Drupal 7 image on Docker Hub.
FROM drupal:7 FROM drupal:7
# Set the farmOS version in an environment variable. # Set the farmOS version to download.
#ENV FARMOS_VERSION 7.x-1.3 #ARG FARMOS_VERSION=7.x-1.3
ENV FARMOS_VERSION 7.x-1.x-dev ARG FARMOS_VERSION=7.x-1.x-dev
# Enable Apache rewrite module. # Enable Apache rewrite module.
RUN a2enmod rewrite RUN a2enmod rewrite

View File

@ -2,7 +2,7 @@
FROM farmos/farmos:7.x-1.x FROM farmos/farmos:7.x-1.x
# Set the farmOS version to the development branch. # Set the farmOS version to the development branch.
ENV FARMOS_VERSION 7.x-1.x ARG FARMOS_VERSION=7.x-1.x
# Install Xdebug. # Install Xdebug.
RUN yes | pecl install xdebug \ RUN yes | pecl install xdebug \