Skip to content

Instantly share code, notes, and snippets.

export VAR1="foo"
export VAR2="bar"
envsubst < docker-compose-template.yml > docker-compose.yml
docker-compose -f docker-compose.yml pull
docker-compose -f docker-compose.yml up -d
[vagrant@hotels_box ~]$ envsubst < docker-compose.yml
app:
image: python:
command: python -v
volumes:
- /tmp:/workdir
[vagrant@hotels_box ~]$ python_version=alpine envsubst < docker-compose.yml
app:
image: python:alpine
command: python -v
:) [07:39:19] bpi ~ $ docker-compose -v
docker-compose version 1.9.0, build 2585387
:) [07:40:46] bpi /tmp $ docker-compose -f docker-compose.yml up
WARNING: The python_version variable is not set. Defaulting to a blank string.
ERROR: no such image: python:: invalid reference format
:( [07:40:59] bpi /tmp $ python_version=alpine docker-compose -f docker-compose.yml up
Pulling app (python:alpine)...
alpine: Pulling from library/python
709515475419: Pull complete
7f8ede2d2484: Pull complete
[vagrant@hotels_box ~]$ docker-compose -v
docker-compose version: 1.3.3
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
[vagrant@hotels_box ~]$ docker-compose -f docker-compose.yml up
Pulling app (python:${python_version})...
Pulling repository python
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/code/build/docker-compose/out00-PYZ.pyz/compose.cli.main", line 32, in main
app:
image: python:${python_version}
command: python -v
volumes:
- /tmp:/workdir
pacman -Sy gettext
yum install gettext
@seggcsont
seggcsont / debian-gettext.sh
Last active May 9, 2017 09:36
Install gettext on Debian
apt-get update
apt-get install gettext-base