ref(Dockerfile): use base 0.3.4, smaller packages and better cleanup#1088
ref(Dockerfile): use base 0.3.4, smaller packages and better cleanup#1088helgi merged 1 commit intodeis:masterfrom
Conversation
|
@mboersma, @krancour and @bacongobbler are potential reviewers of this pull request based on my analysis of |
Current coverage is 87.87% (diff: 100%)@@ master #1088 diff @@
==========================================
Files 42 42
Lines 3603 3603
Methods 0 0
Messages 0 0
Branches 610 610
==========================================
+ Hits 3163 3166 +3
+ Misses 290 288 -2
+ Partials 150 149 -1
|
| /lib/udev \ | ||
| /usr/lib/x86_64-linux-gnu/gconv/IBM* \ | ||
| /usr/lib/x86_64-linux-gnu/gconv/EBC* && \ | ||
| mkdir -p /usr/share/man/man{1..8} |
There was a problem hiding this comment.
can you wrap this with bash -c? See deis/docker-base#15
There was a problem hiding this comment.
Can you or @mboersma explain the rationale? We'd been using mkdir directly for a release or two already without issues I thought?
There was a problem hiding this comment.
Dockerfile commands run under /bin/sh. mkdir foo{1..8} is bash syntax. Notice the difference between these two commands:
$ docker run ubuntu /bin/sh -c 'mkdir -p /usr/share/man/man{1..8} && ls /usr/share/man'
cs
da
de
es
fi
fr
hu
id
it
ja
ko
man1
man3
man5
man7
man8
man{1..8}
nl
pl
pt
pt_BR
ru
sl
sv
tr
zh_CN
zh_TW
$ docker run ubuntu /bin/bash -c 'mkdir -p /usr/share/man/man{1..8} && ls /usr/share/man'
cs
da
de
es
fi
fr
hu
id
it
ja
ko
man1
man2
man3
man4
man5
man6
man7
man8
nl
pl
pt
pt_BR
ru
sl
sv
tr
zh_CN
zh_TW
There was a problem hiding this comment.
Hmmm - that's fair. annoying tho since it made it all the way up to ubuntu-slim :| guess it wasn't really tested the first time around :(
There was a problem hiding this comment.
It was originally tested, but it was broken in deis/docker-base#13. Before then we were wrapping it with bash -c: https://github.com/deis/docker-base/blob/cb24562c729d9ad87abd1d74f0786cd0f925eb6f/rootfs/Dockerfile#L16
There was a problem hiding this comment.
Didn't even see that change in that PR... trippy
4a3d91f to
cc0f507
Compare
|
this caused the controller to crashloop |
|
@jchauncey thanks, already looking into it - doesn't happen on my persona cluster so I'm having to look at other places right now |
| /lib/udev \ | ||
| /usr/lib/x86_64-linux-gnu/gconv/IBM* \ | ||
| /usr/lib/x86_64-linux-gnu/gconv/EBC* && \ | ||
| mkdir -p /usr/share/man/man{1..8} |
There was a problem hiding this comment.
This mkdir command is redundant with the same one in deis/base, so it shouldn't be necessary. However, see deis/docker-base#14.
There was a problem hiding this comment.
This is not redundant - like lines above you can see /usr/share/man being included in the rm -rf statement
| /lib/udev \ | ||
| /usr/lib/x86_64-linux-gnu/gconv/IBM* \ | ||
| /usr/lib/x86_64-linux-gnu/gconv/EBC* && \ | ||
| mkdir -p /usr/share/man/man{1..8} |
| RUN buildDeps='gcc git libffi-dev libpq-dev python3-dev'; \ | ||
| RUN buildDeps='gcc git libffi-dev libpq-dev python3-dev python3-pip python3-wheel python3-setuptools'; \ | ||
| apt-get update && \ | ||
| apt-get install -y --no-install-recommends \ |
There was a problem hiding this comment.
Can you prefix this with DEBIAN_FRONTEND=noninteractive? The warnings from apt-get are distracting.
There was a problem hiding this comment.
Can you point me to where it is warning you off that?
There was a problem hiding this comment.
I don't have logs handy, so just ignore me. It's a pervasive issue that isn't strictly in scope for this PR, so let's fix it later.
There was a problem hiding this comment.
I asked because I haven't found it in the e2e building phase but I have seen it in chef and such before. Depends if the env in ubuntu-slim isn't doing its job
Use
python3-pipinstead of using non-package management approach as this provides us with the proper pip version anyway, and better cleanupOld vs New image size: