Skip to content

Commit 660a261

Browse files
committed
Adjust suggested "dpkg" usage to account for potentially receiving an arch tuple
Fixes #24; thanks @dol!
1 parent d61066c commit 660a261

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ We assume installation inside Docker (probably not the right tool for most use-c
2828
ENV GOSU_VERSION 1.9
2929
RUN set -x \
3030
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
31-
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
32-
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
31+
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
32+
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
33+
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
3334
&& export GNUPGHOME="$(mktemp -d)" \
3435
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
3536
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
@@ -48,8 +49,9 @@ RUN set -x \
4849
dpkg \
4950
gnupg \
5051
openssl \
51-
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
52-
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
52+
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
53+
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
54+
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
5355
&& export GNUPGHOME="$(mktemp -d)" \
5456
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
5557
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \

0 commit comments

Comments
 (0)