Commit a9f97da0 authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

Teseo porting to GIMP-2.10 and other optimizations

parent 7c4ec03c
# Docker for GIMP Development Environment based on alpine
# To guarantee gimp-2.8.x use alpine 3.8.4
FROM alpine:3.8.4
# To guarantee gimp-2.10.x use alpine 3.9.2
FROM alpine:3.9.2
LABEL maintainer="Matteo Quintiliani <matteo.quintiliani@ingv.it>"
......@@ -41,7 +41,23 @@ RUN apk add --no-cache \
screen \
xauth \
glade3 \
gimp-dev
gimp-dev \
iso-codes \
gconf \
xdg-utils \
dbus-x11 \
firefox-esr
######### ##########################
# # gimp-help
# ##################################
# RUN apk add --no-cache curl py2-libxml2
# ENV GIMP_HELP_PREFIX=gimp-help-2.8.2
# ENV GIMP_HELP_TAR_FILE=${GIMP_HELP_PREFIX}.tar.bz2
# RUN curl -O -J -L https://download.gimp.org/mirror/pub/gimp/help/${GIMP_HELP_TAR_FILE}
# RUN tar xvfj ${GIMP_HELP_TAR_FILE}
# RUN apk add --no-cache libxslt docbook-xsl
# RUN cd ${GIMP_HELP_PREFIX} && ./configure ALL_LINGUAS=en && make && make install
##################################
# Configure SSH server
......@@ -203,9 +219,17 @@ RUN echo 'export PATH=/usr/local/bin:${PATH}' >> ${BASHRC_USER} \
&& echo "alias ll='ls -l --color'" >> ${BASHRC_USER} \
&& echo ". ${BASHRC_USER}" >> ${HOMEDIR_USER}/.bashrc
# Set default browser for teseo user
RUN \
mkdir -p ~/.config \
&& xdg-settings set default-web-browser firefox.desktop
# Copy SSH public key in authorized_keys
COPY ./DockerResources/id_rsa.pub ${HOMEDIR_USER}/.ssh/authorized_keys
# Fake Xauthority file
RUN touch ${HOMEDIR_USER}/.Xauthority
# Test .dockerignore
RUN echo "Test" >> ${DOCKERIGNORED_DIR}/test
......@@ -217,6 +241,8 @@ USER ${USER_NAME}
WORKDIR ${HOMEDIR_USER}
COPY ./DockerResources/entrypoint.sh /opt/docker/entrypoint.sh
# RUN sudo apk del dbus-x11
EXPOSE 22
ENTRYPOINT ["/opt/docker/entrypoint.sh"]
# CMD ["/usr/sbin/sshd","-D"]
......@@ -48,10 +48,8 @@ run_xhost:
run_ssh_xhost:
ssh-keygen -R [localhost]:$(SSH_CONTAINER_PORT)
chmod 600 ./DockerResources/id_rsa
# Manual reverse SSH tunneling X11 port forwarding
# ssh -i ./DockerResources/id_rsa -oStrictHostKeyChecking=no -R $(X11_PORT):localhost:$(X11_PORT) -p $(SSH_CONTAINER_PORT) teseo@localhost -C "export DISPLAY=localhost:0 && gimp" || (echo ""; echo "WARNING: Did you run 'make -f Makefile.Docker start' before run_ssh_xhost?"; echo "";)
# X11 port forwarding by ssh -Y option
ssh -i ./DockerResources/id_rsa -oStrictHostKeyChecking=no -Y -p $(SSH_CONTAINER_PORT) teseo@localhost -C "gimp" || (echo ""; echo "WARNING: Did you run 'make -f Makefile.Docker start' before run_ssh_xhost?"; echo "";)
ssh -i ./DockerResources/id_rsa -oStrictHostKeyChecking=no -Y -p $(SSH_CONTAINER_PORT) teseo@localhost 'export `dbus-launch`; dbus-launch gimp; kill -TERM $$DBUS_SESSION_BUS_PID' || (echo ""; echo "WARNING: Did you run 'make -f Makefile.Docker start' before run_ssh_xhost?"; echo "";)
xhost_disable_control:
# WARNING: access control disabled, clients can connect from any host
......
......@@ -3,7 +3,8 @@
######################################
#Dockerfile
DOCKERFILE=Dockerfile.alpine
DOCKERBASEIMAGE=alpine
DOCKERFILE=Dockerfile.$(DOCKERBASEIMAGE)
# Custom SSH port used to access to docker container
SSH_CONTAINER_PORT = 10022
......@@ -35,8 +36,8 @@ XHOST_PATH = /usr/X11R6/bin:/usr/bin/X11:/opt/X11/bin
######################################
NS = gimp-teseo
IMAGE_NAME = teseo2
EXTENDED_VERSION = -rc2
VERSION = 2.8.0$(EXTENDED_VERSION)
EXTENDED_VERSION = -dev-$(DOCKERBASEIMAGE)
VERSION = 2.10.0$(EXTENDED_VERSION)
CONTAINER_NAME = $(NS)-$(IMAGE_NAME)-container
CONTAINER_INSTANCE = $(VERSION)
......@@ -45,9 +46,10 @@ CONTAINER_INSTANCE = $(VERSION)
######################################
VOLUMES_ESSENTIAL = \
-v /var/run/docker.sock=/var/run/docker.sock \
--mount type=bind,source=${BASEMOUNTDIR}/.config/GIMP,target=/home/teseo/.config/GIMP \
--mount type=bind,source=${BASEMOUNTDIR}/.local,target=/home/teseo/.local \
--mount type=bind,source=${BASEMOUNTDIR}/.gimp-2.8,target=/home/teseo/.gimp-2.8 \
--mount type=bind,source=${BASEMOUNTDIR}/data,target=/home/teseo/data
# --mount type=bind,source=${BASEMOUNTDIR}/.gimp-2.8,target=/home/teseo/.gimp-2.8 \
VOLUMES = \
$(VOLUMES_ESSENTIAL) \
......
......@@ -70,7 +70,8 @@ Edit the file `Makefile.Docker.env` and set properly the following custom variab
######################################
#Dockerfile
DOCKERFILE=Dockerfile.alpine
DOCKERBASEIMAGE=alpine
DOCKERFILE=Dockerfile.$(DOCKERBASEIMAGE)
# Custom SSH port used to access to docker container
SSH_CONTAINER_PORT = 10022
......@@ -188,7 +189,7 @@ make -f Makefile.Docker build
### Requirements
- gimp-2.2.9 up to gimp-2.8.x
- gimp-2.2.9 up to gimp-2.10.x
The configure scripts might fail asking you the dependency libraries you have to install or to specify into PKG\_CONFIG\_PATH.
......
......@@ -9,9 +9,9 @@ m4_define([plugin_name], [teseo-2])
dnl These three define the plug-in version number
m4_define([plugin_major_version], [2])
m4_define([plugin_minor_version], [8])
m4_define([plugin_minor_version], [10])
m4_define([plugin_micro_version], [0])
m4_define([plugin_build_version], [rc2])
m4_define([plugin_build_version], [dev])
m4_ifdef([plugin_build_version],
[
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment