Skip to content

Instantly share code, notes, and snippets.

@mini4
Forked from toddlers/Dockerfile
Created October 25, 2018 08:47
Show Gist options
  • Save mini4/6dcec1244f30e9f888b47481e6541319 to your computer and use it in GitHub Desktop.
Save mini4/6dcec1244f30e9f888b47481e6541319 to your computer and use it in GitHub Desktop.
using envsubst in Dockerfile
FROM ubuntu:trusty
RUN \
apt-get update \
&& apt-get -y install gettext-base \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV VALUE=foo
ENV VALUE1=boo
COPY config.txt source_config.txt
RUN envsubst < "source_config.txt" > "config.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment