Skip to content

Commit d58b5c2

Browse files
committed
fix(jinja): support LXDE and Ubuntu 20.04 only
1 parent c41043b commit d58b5c2

File tree

3 files changed

+19
-32
lines changed

3 files changed

+19
-32
lines changed

Dockerfile.j2

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,53 +27,39 @@ RUN apt update \
2727
&& apt autoclean -y \
2828
&& apt autoremove -y \
2929
&& rm -rf /var/lib/apt/lists/*
30-
{%if image == "ubuntu:18.04"%}
31-
ENV X11VNC_VERSION=0.9.16-1
32-
{%else%}
33-
ENV X11VNC_VERSION=0.9.14-1*
34-
# arc-theme
35-
RUN add-apt-repository -y ppa:noobslab/themes
36-
{%endif%}
3730
# install debs error if combine together
38-
RUN add-apt-repository -y ppa:fcwu-tw/apps \
39-
&& apt update \
31+
RUN apt update \
4032
&& apt install -y --no-install-recommends --allow-unauthenticated \
41-
xvfb x11vnc=$X11VNC_VERSION \
42-
{%for package in addon_packages%}{{package}} {%endfor%} \
43-
&& add-apt-repository -r ppa:fcwu-tw/apps \
33+
xvfb x11vnc \
34+
vim-tiny firefox ttf-ubuntu-font-family ttf-wqy-zenhei \
4435
&& apt autoclean -y \
4536
&& apt autoremove -y \
4637
&& rm -rf /var/lib/apt/lists/*
47-
{%if desktop == "lxde" %}
4838
RUN apt update \
49-
&& apt install -y --no-install-recommends --allow-unauthenticated \
50-
lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
51-
&& apt autoclean -y \
52-
&& apt autoremove -y \
39+
&& apt install -y gpg-agent \
40+
&& curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
41+
&& (dpkg -i ./google-chrome-stable_current_amd64.deb || apt-get install -fy) \
42+
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add \
43+
&& rm google-chrome-stable_current_amd64.deb \
5344
&& rm -rf /var/lib/apt/lists/*
45+
{%if desktop == "lxde" %}
5446
{%endif%}
5547
{%if desktop == "lxqt" %}
56-
RUN apt update \
57-
&& apt install -y --no-install-recommends --allow-unauthenticated \
58-
lxqt openbox gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf arc-theme \
59-
&& apt autoclean -y \
60-
&& apt autoremove -y \
61-
&& rm -rf /var/lib/apt/lists/*
6248
{%endif%}
6349
{%if desktop == "xfce4" %}
50+
{%endif%}
6451
RUN apt update \
6552
&& apt install -y --no-install-recommends --allow-unauthenticated \
66-
xubuntu-desktop \
53+
lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
6754
&& apt autoclean -y \
6855
&& apt autoremove -y \
6956
&& rm -rf /var/lib/apt/lists/*
70-
{%endif%}
7157
# Additional packages require ~600MB
7258
# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw
7359

74-
# tini for subreap
60+
# tini to fix subreap
7561
ARG TINI_VERSION=v0.18.0
76-
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-{{arch}} /bin/tini
62+
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini
7763
RUN chmod +x /bin/tini
7864

7965
# ffmpeg
@@ -84,13 +70,13 @@ RUN apt update \
8470
&& mkdir /usr/local/ffmpeg \
8571
&& ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg
8672

87-
8873
# python library
8974
COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/
9075
RUN apt-get update \
9176
&& dpkg-query -W -f='${Package}\n' > /tmp/a.txt \
92-
&& apt-get install -y python-pip python-dev build-essential \
93-
&& pip install setuptools wheel && pip install -r /tmp/requirements.txt \
77+
&& apt-get install -y python3-pip python3-dev build-essential \
78+
&& pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \
79+
&& ln -s /usr/bin/python3 /usr/local/bin/python \
9480
&& dpkg-query -W -f='${Package}\n' > /tmp/b.txt \
9581
&& apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \
9682
&& apt-get autoclean -y \

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ REPO ?= dorowu/ubuntu-desktop-lxde-vnc
55
TAG ?= latest
66
# you can choose other base image versions
77
IMAGE ?= ubuntu:20.04
8+
# IMAGE ?= nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
89
# choose from supported flavors (see available ones in ./flavors/*.yml)
910
FLAVOR ?= lxde
1011
# armhf or amd64
@@ -18,7 +19,7 @@ build: $(templates)
1819
docker build -t $(REPO):$(TAG) .
1920

2021
# Test run the container
21-
# the local dir will be mounted under /src read-only
22+
# the local dir will be mounted under /src read-only
2223
run:
2324
docker run --privileged --rm \
2425
-p 6080:80 -p 6081:443 \
@@ -27,6 +28,7 @@ run:
2728
-e ALSADEV=hw:2,0 \
2829
-e SSL_PORT=443 \
2930
-e RELATIVE_URL_ROOT=approot \
31+
-e OPENBOX_ARGS="--startup /usr/bin/galculator" \
3032
-v ${PWD}/ssl:/etc/nginx/ssl \
3133
--device /dev/snd \
3234
--name ubuntu-desktop-lxde-test \

rootfs/usr/local/lib/web/backend/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ MarkupSafe==1.1.1
1414
meld3==2.0.0
1515
requests==2.22.0
1616
six==1.12.0
17-
supervisor==4.1.0
1817
urllib3==1.25.6
1918
websocket-client==0.47.0
2019
Werkzeug==0.16.0

0 commit comments

Comments
 (0)