Mercurial > sat_docs
comparison docker/media/Dockerfile @ 105:b69056368901
docker: images optimisation:
- reduced the number of layers by grouping many instructions
- moved stuff which don't change a lot at the beginning, and hg/apt at the end
- scripts are not now in scripts/ subdirectories
- prosody.cfg.lua is added using ADD instead of getting it online
- .hg/dirstate is copied in base (backend) and libervia, so mercurial revision is known
- removed lot of useless WORKDIR instruction, they are replaced by "cd" inside RUN instructions
- cleaning (apt-clean, rm) is done on the same instruction as the one than generate the data, to avoid useless data in layers
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 28 Feb 2016 02:01:20 +0100 |
parents | 686a8c982c3f |
children |
comparison
equal
deleted
inserted
replaced
104:b59491821a8a | 105:b69056368901 |
---|---|
8 | 8 |
9 FROM salutatoi/base:latest | 9 FROM salutatoi/base:latest |
10 | 10 |
11 MAINTAINER Goffi <goffi@goffi.org> | 11 MAINTAINER Goffi <goffi@goffi.org> |
12 | 12 |
13 WORKDIR /usr/share/sat | 13 RUN cd /usr/share/sat && hg clone https://repos.goffi.org/sat_media media |
14 | |
15 RUN hg clone https://repos.goffi.org/sat_media media | |
16 | 14 |
17 # ftp workflow is kept below on purpose, but we use currently hg for media | 15 # ftp workflow is kept below on purpose, but we use currently hg for media |
18 # WORKDIR /usr/share/sat/media_tmp | 16 # WORKDIR /usr/share/sat/media_tmp |
19 # | 17 # |
20 # # wget and tar are not installed, so we use python | 18 # # wget and tar are not installed, so we use python |
21 # RUN python -c 'import urllib2,tarfile,cStringIO;tar=tarfile.open(fileobj=cStringIO.StringIO(urllib2.urlopen("ftp://ftp.goffi.org/sat_media/sat_media.tar.bz2").read()));tar.extractall()' | 19 # RUN python -c 'import urllib2,tarfile,cStringIO;tar=tarfile.open(fileobj=cStringIO.StringIO(urllib2.urlopen("ftp://ftp.goffi.org/sat_media/sat_media.tar.bz2").read()));tar.extractall()' |
22 # | 20 # |
23 # # The media_tmp complication is due to an AUFS bug, see https://github.com/docker/docker/issues/4570 | 21 # # The media_tmp complication is due to an AUFS bug, see https://github.com/docker/docker/issues/4570 |
24 # WORKDIR /usr/share/sat/ | 22 # WORKDIR /usr/share/sat/ |
25 # RUN mv media_tmp/sat_media* media && rmdir media_tmp | 23 # RUN mv media_tmp/sat_media* media && rmdir media_tmp |
26 | |
27 WORKDIR /home/sat |