Skip to content

Commit b179eb8

Browse files
committed
grab gosu from apt-get in Dockerfile
* gosu v1.10 started being shipped with debian as of the `stretch` release. Install from apt-get instead of `curl`-ing it from the github release page.
1 parent 4ce8974 commit b179eb8

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

Dockerfile

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,12 @@ RUN apt-get update \
1616
libffi-dev \
1717
python-dev \
1818
gnupg2 \
19+
# grab gosu for easy step-down from root
20+
gosu \
1921
&& apt-get clean \
2022
&& apt-get autoremove -y \
2123
&& rm -rf /var/lib/apt/lists/*
2224

23-
# grab gosu for easy step-down from root
24-
ENV GOSU_VERSION 1.4
25-
RUN apt-get update \
26-
&& apt-get install -y \
27-
curl \
28-
&& for key in \
29-
# GOSU
30-
B42F6819007F00F88E364FD4036A9C25BF357DD4 \
31-
; do \
32-
gpg2 --no-tty --keyserver hkp://ipv4.pool.sks-keyservers.net:80 --recv-keys "$key" || \
33-
gpg2 --no-tty --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys "$key" || \
34-
gpg2 --no-tty --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" || \
35-
gpg2 --no-tty --keyserver hkp://keyserver.pgp.com:80 --recv-keys "$key" \
36-
; done \
37-
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
38-
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
39-
&& gpg2 --verify /usr/local/bin/gosu.asc \
40-
&& rm /usr/local/bin/gosu.asc \
41-
&& chmod +x /usr/local/bin/gosu \
42-
&& apt-get clean \
43-
&& apt-get autoremove -y \
44-
curl \
45-
&& rm -rf /var/lib/apt/lists/*
46-
4725
RUN mkdir -p /code
4826
WORKDIR /code
4927

0 commit comments

Comments
 (0)