-
Notifications
You must be signed in to change notification settings - Fork 5
/
linux-test.Dockerfile
92 lines (79 loc) · 2.76 KB
/
linux-test.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# x11docker/lxde
#
# Run LXDE desktop in docker.
# Use x11docker to run image.
# Get x11docker from github:
# https://github.com/mviereck/x11docker
#
# Examples:
# - Run desktop:
# x11docker --desktop x11docker/lxde
# - Run single application:
# x11docker x11docker/lxde pcmanfm
#
# Options:
# Persistent home folder stored on host with --home
# Shared host folder with --sharedir DIR
# Hardware acceleration with option --gpu
# Clipboard sharing with option --clipboard
# Sound support with option --alsa
# With pulseaudio in image, sound support with --pulseaudio
#
# See x11docker --help for further options.
FROM debian:stretch
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y dbus-x11 procps psmisc xvfb xterm libfuse2 xdotool git sudo fuse
# OpenGL / MESA
RUN apt-get install -y mesa-utils mesa-utils-extra libxv1 kmod xz-utils
# Language/locale settings
# replace en_US by your desired locale setting,
# for example de_DE for german.
ENV LANG en_US.UTF-8
RUN echo $LANG UTF-8 > /etc/locale.gen
RUN apt-get install -y locales && update-locale --reset LANG=$LANG
# some utils to have proper menus, mime file types etc.
RUN apt-get install -y --no-install-recommends xdg-utils xdg-user-dirs \
menu menu-xdg mime-support desktop-file-utils
# LXDE
# (gnome-polkit is an unfortuante and fat replacement for lxpolkit.
# lxpolkit shows an annoying error message on startup.)
RUN apt-get install -y --no-install-recommends policykit-1-gnome
RUN apt-get install -y --no-install-recommends lxde
# additional goodies
RUN apt-get install -y --no-install-recommends lxlauncher lxtask
# GTK 2 settings for icons and style
RUN echo '\n\
gtk-theme-name="Raleigh"\n\
gtk-icon-theme-name="nuoveXT2"\n\
' > /etc/skel/.gtkrc-2.0
# GTK 3 settings for icons and style
RUN mkdir -p /etc/skel/.config/gtk-3.0
RUN echo '\n\
[Settings]\n\
gtk-theme-name="Raleigh"\n\
gtk-icon-theme-name="nuoveXT2"\n\
' > /etc/skel/.config/gtk-3.0/settings.ini
# wallpaper
RUN mkdir -p /etc/skel/.config/pcmanfm/LXDE
RUN echo '\n\
[*]\n\
wallpaper_mode=stretch\n\
wallpaper_common=1\n\
wallpaper=/usr/share/lxde/wallpapers/lxde_blue.jpg\n\
' > /etc/skel/.config/pcmanfm/LXDE/desktop-items-0.conf
# startscript to copy dotfiles from /etc/skel
# runs either CMD or image command from docker run
ENV DISPLAY ":99"
RUN echo '#! /bin/sh\n\
Xvfb :99 -pixdepths 3 27 -screen 0 1024x648x16\n\
[ -n "$HOME" ] && [ ! -e "$HOME/.config" ] && cp -R /etc/skel/. $HOME/ \n\
exec $*\n\
startlxde\n\
' > /usr/local/bin/start
RUN chmod +x /usr/local/bin/start
RUN useradd -ms /bin/bash -u 1000 user && \
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/default
ENTRYPOINT ["/usr/local/bin/start"]
CMD ["startlxde"]
ENV DEBIAN_FRONTEND newt