-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
44 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,31 @@ | ||
FROM ubuntu:16.04 | ||
LABEL authors="IgorV <[email protected]>" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
DEBCONF_NONINTERACTIVE_SEEN=true | ||
ARG APP_USER=app | ||
ARG APP_LANG="en_US.UTF-8" | ||
ARG APP_LANGUAGE="en_US:en" | ||
ARG APP_LC_ALL="en_US.UTF-8" | ||
|
||
RUN apt-get update -qqy \ | ||
&& apt-get install -qqy --no-install-recommends apt-utils \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
TZ="UTC" \ | ||
APP_USER=${APP_USER} \ | ||
APP_HOME="/home/${APP_USER}" \ | ||
TERM=linux | ||
|
||
# Locale | ||
RUN apt-get update -qqy \ | ||
&& apt-get install -qqy --no-install-recommends \ | ||
language-pack-en \ | ||
apt-utils \ | ||
&& apt-get install -qqy --no-install-recommends \ | ||
locales \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ | ||
&& locale-gen --purge "en_US.UTF-8" \ | ||
&& update-locale LANG="en_US.UTF-8" LANGUAGE="en_US:en" LC_ALL="en_US.UTF-8" \ | ||
&& dpkg-reconfigure --frontend noninteractive locales | ||
|
||
ENV LANG="en_US.UTF-8" \ | ||
LANGUAGE="en_US:en" \ | ||
LC_ALL="en_US.UTF-8" \ | ||
TZ="UTC" | ||
|
||
# Timezone | ||
RUN apt-get update -qqy \ | ||
&& apt-get install -qqy --no-install-recommends tzdata \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ | ||
&& locale-gen --purge "${APP_LANG}" \ | ||
&& update-locale LANG="${APP_LANG}" LANGUAGE="${APP_LANGUAGE}" LC_ALL="${APP_LC_ALL}" \ | ||
&& dpkg-reconfigure --frontend noninteractive locales \ | ||
&& apt-get install -qqy --no-install-recommends \ | ||
language-pack-en \ | ||
tzdata \ | ||
&& echo "${TZ}" > /etc/timezone \ | ||
&& dpkg-reconfigure --frontend noninteractive tzdata | ||
|
||
# Common tools | ||
RUN apt-get update -qqy \ | ||
&& dpkg-reconfigure --frontend noninteractive tzdata \ | ||
&& apt-get install -qqy --no-install-recommends \ | ||
bzip2 \ | ||
curl \ | ||
|
@@ -40,19 +34,15 @@ RUN apt-get update -qqy \ | |
openjdk-8-jre-headless \ | ||
unzip \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ | ||
&& sed -e 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' \ | ||
-i ./usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security | ||
|
||
ARG APP_USER=app | ||
ENV APP_USER=${APP_USER} \ | ||
APP_HOME="/home/${APP_USER}" \ | ||
TERM=linux | ||
-i /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security \ | ||
&& adduser --disabled-password --uid 899 --home ${APP_HOME} --gecos '' ${APP_USER} \ | ||
&& passwd -d ${APP_USER} \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
# Add app user | ||
RUN adduser --disabled-password --uid 899 --home ${APP_HOME} --gecos '' ${APP_USER} \ | ||
&& adduser ${APP_USER} sudo \ | ||
&& passwd -d ${APP_USER} | ||
ENV LANG=${LOCALE_LANG} \ | ||
LANGUAGE=${LOCALE_LANGUAGE} \ | ||
LC_ALL=${LOCALE_LC_ALL} | ||
|
||
WORKDIR ${APP_HOME} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,20 @@ FROM bravo/japp:1.0 | |
LABEL authors="IgorV <[email protected]>" | ||
|
||
# xpra and xorg-video-dummy with dependencies | ||
|
||
USER root | ||
|
||
ENV DISPLAY=":100.0" \ | ||
SCREEN_WIDTH=1360 \ | ||
SCREEN_HEIGHT=1020 | ||
|
||
RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe\n" > /etc/apt/sources.list \ | ||
&& echo "deb http://archive.ubuntu.com/ubuntu xenial-updates main universe\n" >> /etc/apt/sources.list \ | ||
&& echo "deb http://security.ubuntu.com/ubuntu xenial-security main universe\n" >> /etc/apt/sources.list \ | ||
&& echo "deb http://winswitch.org/ xenial main" > /etc/apt/sources.list.d/winswitch.list \ | ||
&& curl http://winswitch.org/gpg.asc | apt-key add - \ | ||
&& apt-get update -qqy \ | ||
&& apt-get -qqy --no-install-recommends install \ | ||
&& apt-get install -qqy --no-install-recommends \ | ||
dbus-x11 \ | ||
fluxbox \ | ||
fonts-ipafont-gothic \ | ||
|
@@ -29,27 +35,14 @@ RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe\n" > /etc/ap | |
xserver-xorg-input-void \ | ||
xserver-xorg-video-dummy \ | ||
xterm \ | ||
&& sed -e "s/^\( *\)\(Virtual.*\)$/\1#\2\n\1Virtual ${SCREEN_WIDTH} ${SCREEN_HEIGHT}/" -i /etc/xpra/xorg.conf \ | ||
&& mkdir -p /tmp/.X11-unix /run/dbus \ | ||
&& chmod -R a+rwx /tmp/.X11-unix /run/dbus \ | ||
&& su -l ${APP_USER} -c "touch ${APP_HOME}/.Xmodmap ${APP_HOME}/.Xauthority && mkdir -p ${APP_HOME}/.fluxbox && echo background: unset >> ${APP_HOME}/.fluxbox/overlay" \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* | ||
|
||
RUN mkdir -p /tmp/.X11-unix \ | ||
&& chmod -R +rwx /tmp/.X11-unix \ | ||
&& mkdir -p /run/dbus \ | ||
&& chmod -R +rwx /run/dbus | ||
|
||
USER ${APP_USER} | ||
|
||
ENV DISPLAY=":100.0" \ | ||
SCREEN_WIDTH=1360 \ | ||
SCREEN_HEIGHT=1020 | ||
|
||
# Minimal Xorg configuration | ||
#ADD http://xpra.org/xorg.conf ${APP_HOME}/xorg.conf | ||
COPY xorg.conf ${APP_HOME}/ | ||
RUN touch ${APP_HOME}/.Xmodmap \ | ||
&& touch ${APP_HOME}/.Xauthority \ | ||
&& mkdir -p ${APP_HOME}/.fluxbox \ | ||
&& echo "background: unset" >> ${APP_HOME}/.fluxbox/overlay | ||
|
||
# In container: | ||
# Test1: xpra --no-daemon --no-mdns --no-pulseaudio start :100 --start-child=glxgears | ||
# Test2: xpra --no-daemon --no-mdns --no-pulseaudio --xvfb="Xorg -dpi 96 -noreset -nolisten tcp +extension GLX +extension RANDR +extension RENDER -logfile /home/app/.xpra/Xvfb-10.log -config /home/app/xorg.conf" start :100 --start-child=glxgears | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters