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.
FROM drupal:7
# Set the farmOS version in an environment variable.
#ENV FARMOS_VERSION 7.x-1.3
ENV FARMOS_VERSION 7.x-1.x-dev
# Set the farmOS version to download.
#ARG FARMOS_VERSION=7.x-1.3
ARG FARMOS_VERSION=7.x-1.x-dev
# Enable Apache rewrite module.
RUN a2enmod rewrite

View File

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