Skip to content

Commit

Permalink
#3287: flatten docker 'ENV' as one line
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff1evesque committed Oct 4, 2018
1 parent bfaa20b commit aeb26dd
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 36 deletions.
16 changes: 8 additions & 8 deletions dockerfile/base.dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM ubuntu:16.04

## environment variables
ENV ENVIRONMENT docker
ENV PUPPET /opt/puppetlabs/bin/puppet
ENV ROOT_PROJECT /var/machine-learning
ENV ROOT_PUPPET /etc/puppetlabs
ENV MODULES $ROOT_PUPPET/code/modules
ENV CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib
ENV ENVPATH $ROOT_PUPPET/code/environment/$ENVIRONMENT
ENV PUPPET_VERSION puppet5-release-xenial.deb
ENV ENVIRONMENT docker\
PUPPET /opt/puppetlabs/bin/puppet\
ROOT_PROJECT /var/machine-learning\
ROOT_PUPPET /etc/puppetlabs\
MODULES $ROOT_PUPPET/code/modules\
CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib\
ENVPATH $ROOT_PUPPET/code/environment/$ENVIRONMENT\
PUPPET_VERSION puppet5-release-xenial.deb

## ensure directory
RUN mkdir -p $ROOT_PROJECT/log $ROOT_PUPPET/code/environment/$ENVIRONMENT $ROOT_PUPPET/puppet/hiera $ROOT_PUPPET/code/modules_contrib
Expand Down
10 changes: 5 additions & 5 deletions dockerfile/mongodb.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM jeff1evesque/ml-base:0.8

## local variables
ENV ENVIRONMENT docker
ENV PUPPET /opt/puppetlabs/bin/puppet
ENV ROOT_PUPPET /etc/puppetlabs
ENV MODULES $ROOT_PUPPET/code/modules
ENV CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib
ENV ENVIRONMENT docker\
PUPPET /opt/puppetlabs/bin/puppet\
ROOT_PUPPET /etc/puppetlabs\
MODULES $ROOT_PUPPET/code/modules\
CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib

## copy files into container
COPY hiera $ROOT_PUPPET/puppet/hiera
Expand Down
13 changes: 7 additions & 6 deletions dockerfile/nginx.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM jeff1evesque/ml-base:0.8

## local variables
ENV ENVIRONMENT docker
ENV ROOT_PROJECT /var/machine-learning
ENV PUPPET /opt/puppetlabs/bin/puppet
ENV ROOT_PUPPET /etc/puppetlabs
ENV MODULES $ROOT_PUPPET/code/modules
ENV CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib
ENV ENVIRONMENT docker\
ROOT_PROJECT /var/machine-learning\
PUPPET /opt/puppetlabs/bin/puppet\
ROOT_PUPPET /etc/puppetlabs\
MODULES $ROOT_PUPPET/code/modules\
CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib

ARG TYPE
ARG VHOST
ARG HOST_PORT
Expand Down
10 changes: 5 additions & 5 deletions dockerfile/redis.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM jeff1evesque/ml-base:0.8

## local variables
ENV ENVIRONMENT docker
ENV PUPPET /opt/puppetlabs/bin/puppet
ENV ROOT_PUPPET /etc/puppetlabs
ENV MODULES $ROOT_PUPPET/code/modules
ENV CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib
ENV ENVIRONMENT docker\
PUPPET /opt/puppetlabs/bin/puppet\
ROOT_PUPPET /etc/puppetlabs\
MODULES $ROOT_PUPPET/code/modules\
CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib

## copy files into container
COPY hiera $ROOT_PUPPET/puppet/hiera
Expand Down
12 changes: 6 additions & 6 deletions dockerfile/sklearn.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM jeff1evesque/ml-base:0.8

## local variables
ENV ENVIRONMENT docker
ENV PUPPET /opt/puppetlabs/bin/puppet
ENV ROOT_PROJECT /var/machine-learning
ENV ROOT_PUPPET /etc/puppetlabs
ENV MODULES $ROOT_PUPPET/code/modules
ENV CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib
ENV ENVIRONMENT docker\
PUPPET /opt/puppetlabs/bin/puppet\
ROOT_PROJECT /var/machine-learning\
ROOT_PUPPET /etc/puppetlabs\
MODULES $ROOT_PUPPET/code/modules\
CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib

## copy files into container
COPY hiera $ROOT_PROJECT/hiera
Expand Down
12 changes: 6 additions & 6 deletions dockerfile/webserver.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM jeff1evesque/ml-sklearn:0.8

## local variables
ENV ENVIRONMENT docker
ENV PUPPET /opt/puppetlabs/bin/puppet
ENV ROOT_PROJECT /var/machine-learning
ENV ROOT_PUPPET /etc/puppetlabs
ENV MODULES $ROOT_PUPPET/code/modules
ENV CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib
ENV ENVIRONMENT docker\
PUPPET /opt/puppetlabs/bin/puppet\
ROOT_PROJECT /var/machine-learning\
ROOT_PUPPET /etc/puppetlabs\
MODULES $ROOT_PUPPET/code/modules\
CONTRIB_MODULES $ROOT_PUPPET/code/modules_contrib

## ensure directory
RUN mkdir -p $ROOT_PROJECT/interface $ROOT_PROJECT/hiera $ROOT_PUPPET/brain $ROOT_PUPPET/test
Expand Down

0 comments on commit aeb26dd

Please sign in to comment.