Skip to content

Commit

Permalink
chore(docker): skip "recommended" dependencies (#2917)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Jul 10, 2020
1 parent bce4b1a commit 1cebf87
Showing 1 changed file with 33 additions and 30 deletions.
63 changes: 33 additions & 30 deletions docs/docker/Dockerfile.bionic
Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,53 @@ RUN apt-get update && apt-get install -y curl && \
apt-get install -y nodejs

# 2. Install WebKit dependencies
RUN apt-get update && apt-get install -y libwoff1 \
libopus0 \
libwebp6 \
libwebpdemux2 \
libenchant1c2a \
libgudev-1.0-0 \
libsecret-1-0 \
libhyphen0 \
libgdk-pixbuf2.0-0 \
libegl1 \
libnotify4 \
libxslt1.1 \
libevent-2.1-6 \
libgles2 \
libvpx5
RUN apt-get update && apt-get install -y --no-install-recommends \
libwoff1 \
libopus0 \
libwebp6 \
libwebpdemux2 \
libenchant1c2a \
libgudev-1.0-0 \
libsecret-1-0 \
libhyphen0 \
libgdk-pixbuf2.0-0 \
libegl1 \
libnotify4 \
libxslt1.1 \
libevent-2.1-6 \
libgles2 \
libvpx5

# 3. Install gstreamer and plugins to support video playback in WebKit.
RUN apt-get update && apt-get install -y libgstreamer-gl1.0-0 \
libgstreamer-plugins-bad1.0-0 \
gstreamer1.0-plugins-good
RUN apt-get update && apt-get install -y --no-install-recommends \
libgstreamer-gl1.0-0 \
libgstreamer-plugins-bad1.0-0 \
gstreamer1.0-plugins-good

# 4. Install Chromium dependencies

RUN apt-get update && apt-get install -y libnss3 \
libxss1 \
libasound2 \
fonts-noto-color-emoji
RUN apt-get update && apt-get install -y --no-install-recommends \
libnss3 \
libxss1 \
libasound2 \
fonts-noto-color-emoji

# 5. Install Firefox dependencies

RUN apt-get update && apt-get install -y libdbus-glib-1-2 \
libxt6
RUN apt-get update && apt-get install -y --no-install-recommends \
libdbus-glib-1-2 \
libxt6

# 6. Install ffmpeg to bring in audio and video codecs necessary for playing videos in Firefox.

RUN apt-get update && apt-get install -y ffmpeg
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg

# 7. Add user so we don't need --no-sandbox in Chromium
RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser \
&& mkdir -p /home/pwuser/Downloads \
&& chown -R pwuser:pwuser /home/pwuser

# 8. (Optional) Install XVFB if there's a need to run browsers in headful mode
RUN apt-get update && apt-get install -y xvfb
RUN apt-get update && apt-get install -y --no-install-recommends \
xvfb

# Run everything after as non-privileged user.
# 9. Run everything after as non-privileged user.
USER pwuser

0 comments on commit 1cebf87

Please sign in to comment.