2016-02-27 18:19:26 +00:00
|
|
|
FROM debian
|
2016-02-27 17:56:39 +00:00
|
|
|
|
2018-09-23 15:52:31 +00:00
|
|
|
ENV TOR_VERSION=8.5a1
|
2017-09-03 07:23:37 +00:00
|
|
|
# Via https://dist.torproject.org/torbrowser/$TOR_VERSION/sha256sums-signed-build.txt
|
2018-09-23 15:52:31 +00:00
|
|
|
ENV SHA256_CHECKSUM=8aa4a98924217df1dfda7a69d31ebb14a9dc96398459da2ce54eb436a8eb7d88
|
2017-01-26 06:50:55 +00:00
|
|
|
ENV LANG=C.UTF-8
|
2017-05-19 19:14:29 +00:00
|
|
|
ENV RELEASE_FILE=tor-browser-linux64-${TOR_VERSION}_en-US.tar.xz
|
2017-01-26 06:50:55 +00:00
|
|
|
ENV RELEASE_KEY=0x4E2C6E8793298290
|
|
|
|
ENV RELEASE_URL=https://dist.torproject.org/torbrowser/${TOR_VERSION}/${RELEASE_FILE}
|
|
|
|
ENV PATH=$PATH:/usr/local/bin/Browser
|
2016-02-27 17:56:39 +00:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2017-05-19 19:14:04 +00:00
|
|
|
file \
|
2017-06-30 16:52:14 +00:00
|
|
|
gpg \
|
2017-05-19 19:14:04 +00:00
|
|
|
libx11-xcb1 \
|
2016-02-27 17:56:39 +00:00
|
|
|
libasound2 \
|
|
|
|
libdbus-glib-1-2 \
|
2018-09-23 15:49:04 +00:00
|
|
|
libgtk-3-0 \
|
2016-02-27 17:56:39 +00:00
|
|
|
libxrender1 \
|
|
|
|
libxt6 \
|
|
|
|
xz-utils && \
|
2017-01-26 05:54:25 +00:00
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
useradd --create-home --home-dir /home/user user && \
|
|
|
|
chown -R user:user /home/user
|
2016-05-11 20:55:12 +00:00
|
|
|
|
2017-01-27 04:51:22 +00:00
|
|
|
WORKDIR /usr/local/bin
|
2016-05-11 20:55:12 +00:00
|
|
|
# TODO(hkjn): Stop having gpg import key command separate layer, if we
|
|
|
|
# can figure out why it's flaky and commonly gives "keys: key
|
|
|
|
# 4E2C6E8793298290 can't be retrieved, gpg: no valid OpenPGP data
|
|
|
|
# found."
|
2018-04-09 10:10:31 +00:00
|
|
|
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys ${RELEASE_KEY}
|
|
|
|
|
2016-05-11 20:52:26 +00:00
|
|
|
RUN curl --fail -O -sSL ${RELEASE_URL} && \
|
2016-02-27 17:56:39 +00:00
|
|
|
curl --fail -O -sSL ${RELEASE_URL}.asc && \
|
|
|
|
gpg --verify ${RELEASE_FILE}.asc && \
|
2016-05-11 21:06:44 +00:00
|
|
|
echo "$SHA256_CHECKSUM $RELEASE_FILE" > sha256sums.txt && \
|
2016-05-11 20:08:36 +00:00
|
|
|
sha256sum -c sha256sums.txt && \
|
2016-02-27 17:56:39 +00:00
|
|
|
tar --strip-components=1 -vxJf ${RELEASE_FILE} && \
|
2016-05-11 20:08:36 +00:00
|
|
|
rm -v ${RELEASE_FILE}* sha256sums.txt && \
|
2017-01-26 18:37:03 +00:00
|
|
|
mkdir -p /usr/local/bin/Browser/Downloads && \
|
2017-05-19 19:14:04 +00:00
|
|
|
chown -R user:user /usr/local/bin
|
2016-02-27 17:56:39 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/local/bin/Browser/Downloads
|
|
|
|
USER user
|
|
|
|
|
2017-01-26 19:20:37 +00:00
|
|
|
COPY ["start", "/usr/local/bin/"]
|
|
|
|
ENTRYPOINT ["start"]
|
2017-01-26 05:52:43 +00:00
|
|
|
CMD [""]
|