Skip to content

Instantly share code, notes, and snippets.

@hkaya

hkaya/Dockerfile Secret

Created September 11, 2019 15:03
Show Gist options
  • Save hkaya/829d8513b1c54d2a76b41b74235db588 to your computer and use it in GitHub Desktop.
Save hkaya/829d8513b1c54d2a76b41b74235db588 to your computer and use it in GitHub Desktop.
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
ARG cortexVersion=2.31.0
RUN mkdir -p /opt/cortex/player
RUN apt-get update \
&& apt-get install -y curl gconf2 libnss3 libcups2 libgtk-3-0 libxdamage1 \
libxi6 libxtst6 libpangocairo-1.0-0 libxss1 libxrandr2 libasound2 \
libatk1.0-0 libx11-xcb1 matchbox-window-manager mplayer x11-utils \
xserver-xorg-video-intel-hwe-18.04 \
&& curl https://s3.amazonaws.com/cortex-player/staging/CortexPlayer-${cortexVersion}-linux-x64.tar.gz \
-o /tmp/player.tar.gz \
&& gzip -d /tmp/player.tar.gz \
&& tar xvf /tmp/player.tar -C /opt/cortex/player \
&& rm -rf /tmp/player.tar.gz \
&& apt-get remove --purge -y curl udev libxcomposite-dev \
libxcursor-dev \
&& apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN adduser --group cortex
RUN adduser --quiet --shell /bin/bash --home /home/cortex --ingroup cortex \
--disabled-login --disabled-password --gecos "" cortex
RUN usermod -aG video cortex
RUN chown -R cortex.cortex /opt/cortex
COPY cortex.sh /opt/cortex.sh
RUN chmod 755 /opt/cortex.sh
RUN mkdir -p /home/cortex
ENV HOME /home/cortex
WORKDIR /home/cortex
EXPOSE 9222
CMD /opt/cortex.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment