-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathDockerfile
75 lines (67 loc) · 2.48 KB
/
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
# ------------------------------------------------------------------------------
# Pull base image
FROM ubuntu:jammy
LABEL author="Brett Kuskie <[email protected]>"
# ------------------------------------------------------------------------------
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV WINDOWMANAGER=openbox
ENV LOCALE=en_US
ENV LANG=C
# ------------------------------------------------------------------------------
# Install tigervnc,openbox and clean up
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dbus-x11 \
fbpanel \
hsetroot \
less \
locales \
nano \
obconf \
openbox \
sudo \
tigervnc-common \
tigervnc-standalone-server \
tigervnc-tools \
tzdata \
wget \
x11-utils \
x11-xserver-utils \
xfonts-base \
xterm && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
# ------------------------------------------------------------------------------
# Configure locale
RUN echo "LC_ALL=${LOCALE}.UTF-8" >> /etc/environment && \
echo "LANG=${LOCALE}.UTF-8" > /etc/locale.conf && \
echo "${LOCALE}.UTF-8 UTF-8" >> /etc/locale.gen && \
locale-gen
# ------------------------------------------------------------------------------
# Configure XTerm
RUN sed -e 's/saveLines: 1024/saveLines: 8192/' -i /etc/X11/app-defaults/XTerm
# ------------------------------------------------------------------------------
# Configure openbox
RUN mkdir -p /usr/share/ubuntu-desktop/openbox && \
cat /etc/xdg/openbox/rc.xml \
| sed -e 's@<number>4</number>@<number>8</number>@' \
> /usr/share/ubuntu-desktop/openbox/rc.xml
# ------------------------------------------------------------------------------
# Install scripts and configuration files
COPY app/app.sh app/imagestart.sh app/tiger.sh /app/
COPY bin/set_wallpaper.sh /usr/bin/
COPY conf/xstartup /usr/share/ubuntu-desktop/vnc/
COPY conf/autostart conf/menu.xml /usr/share/ubuntu-desktop/openbox/
COPY conf/fbpaneldefault /usr/share/ubuntu-desktop/fbpanel/default
COPY conf/sudo /usr/share/ubuntu-desktop/sudo
COPY conf/bash.colors conf/color_prompt.sh conf/lang.sh /opt/bash/
COPY scripts/*.sh /app/scripts/
# ------------------------------------------------------------------------------
# Expose ports
EXPOSE 5901
# ------------------------------------------------------------------------------
# Define default command
CMD ["/app/app.sh"]