2017-01-20 11:03:18 +01:00
|
|
|
# Visual Studio Code in a container
|
2015-06-09 22:44:12 +02:00
|
|
|
# NOTE: Needs the redering device (yeah... idk)
|
|
|
|
#
|
|
|
|
# docker run -d \
|
2016-06-25 15:38:22 +02:00
|
|
|
# -v /tmp/.X11-unix:/tmp/.X11-unix \
|
|
|
|
# -v $HOME:/home/user \
|
|
|
|
# -e DISPLAY=unix$DISPLAY \
|
|
|
|
# --device /dev/dri \
|
|
|
|
# --name vscode \
|
|
|
|
# jess/vscode
|
2015-06-09 22:44:12 +02:00
|
|
|
|
2016-09-19 20:31:11 +02:00
|
|
|
FROM debian:stretch
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2015-06-09 22:11:55 +02:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
libasound2 \
|
2016-02-04 01:11:52 +01:00
|
|
|
libatk1.0-0 \
|
|
|
|
libcairo2 \
|
|
|
|
libcups2 \
|
|
|
|
libdatrie1 \
|
|
|
|
libdbus-1-3 \
|
|
|
|
libfontconfig1 \
|
|
|
|
libfreetype6 \
|
2015-06-09 22:11:55 +02:00
|
|
|
libgconf-2-4 \
|
2016-02-04 01:11:52 +01:00
|
|
|
libgcrypt20 \
|
|
|
|
libgl1-mesa-dri \
|
|
|
|
libgl1-mesa-glx \
|
|
|
|
libgdk-pixbuf2.0-0 \
|
|
|
|
libglib2.0-0 \
|
2015-06-09 22:11:55 +02:00
|
|
|
libgtk2.0-0 \
|
2016-02-04 01:11:52 +01:00
|
|
|
libgpg-error0 \
|
|
|
|
libgraphite2-3 \
|
2016-06-25 15:38:22 +02:00
|
|
|
libnotify-bin \
|
2015-06-09 22:11:55 +02:00
|
|
|
libnss3 \
|
2016-02-04 01:11:52 +01:00
|
|
|
libnspr4 \
|
|
|
|
libpango-1.0-0 \
|
|
|
|
libpangocairo-1.0-0 \
|
|
|
|
libxcomposite1 \
|
|
|
|
libxcursor1 \
|
|
|
|
libxdmcp6 \
|
|
|
|
libxi6 \
|
|
|
|
libxrandr2 \
|
|
|
|
libxrender1 \
|
2016-11-09 22:04:37 +01:00
|
|
|
libxss1 \
|
2015-06-09 22:11:55 +02:00
|
|
|
libxtst6 \
|
2016-02-04 01:11:52 +01:00
|
|
|
liblzma5 \
|
2015-06-09 22:11:55 +02:00
|
|
|
--no-install-recommends
|
|
|
|
|
2015-06-09 22:44:12 +02:00
|
|
|
ENV HOME /home/user
|
|
|
|
RUN useradd --create-home --home-dir $HOME user \
|
|
|
|
&& chown -R user:user $HOME
|
|
|
|
|
2017-02-12 19:27:54 +01:00
|
|
|
# https://code.visualstudio.com/Download
|
|
|
|
ENV CODE_VERSION 1.9.1-1486597190
|
|
|
|
ENV CODE_COMMIT f9d0c687ff2ea7aabd85fb9a43129117c0ecf519
|
2016-11-09 22:04:37 +01:00
|
|
|
|
2015-06-09 22:11:55 +02:00
|
|
|
# download the source
|
2016-02-04 01:11:52 +01:00
|
|
|
RUN buildDeps=' \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2016-09-21 02:31:29 +02:00
|
|
|
gnupg \
|
2016-02-04 01:11:52 +01:00
|
|
|
' \
|
|
|
|
&& set -x \
|
|
|
|
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
|
2016-09-21 02:59:57 +02:00
|
|
|
&& curl -sL https://deb.nodesource.com/setup_6.x | bash - \
|
2016-02-04 01:11:52 +01:00
|
|
|
&& apt-get update && apt-get install -y nodejs --no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2016-11-09 22:04:37 +01:00
|
|
|
&& curl -sSL "https://az764295.vo.msecnd.net/stable/${CODE_COMMIT}/code_${CODE_VERSION}_amd64.deb" -o /tmp/vs.deb \
|
2016-09-21 02:31:29 +02:00
|
|
|
&& dpkg -i /tmp/vs.deb \
|
|
|
|
&& rm -rf /tmp/vs.deb \
|
2016-02-04 01:11:52 +01:00
|
|
|
&& apt-get purge -y --auto-remove $buildDeps
|
2015-06-09 22:44:12 +02:00
|
|
|
|
|
|
|
COPY start.sh /usr/local/bin/start.sh
|
2016-11-11 16:47:30 +01:00
|
|
|
COPY local.conf /etc/fonts/local.conf
|
|
|
|
|
2015-06-09 22:44:12 +02:00
|
|
|
WORKDIR $HOME
|
2015-06-09 22:11:55 +02:00
|
|
|
|
2015-06-09 22:44:12 +02:00
|
|
|
ENTRYPOINT [ "/usr/local/bin/start.sh" ]
|