Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Hofmann committed Oct 29, 2018
2 parents 45777cb + 35bfb52 commit 095d9bb
Show file tree
Hide file tree
Showing 17 changed files with 107 additions and 56 deletions.
16 changes: 0 additions & 16 deletions .build/env_dockerhub.sh

This file was deleted.

40 changes: 31 additions & 9 deletions .build/trigger_dockerhub.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
#!/usr/bin/env bash
set -e -o pipefail


if [ -z $GIT_BRANCH ] ; then
GIT_BRANCH=$TRAVIS_BRANCH
fi
if [ -z $GIT_BRANCH ] ; then
echo "cloud not execute script! Please specify at least on environment variable of: GIT_BRANCH, TRAVIS_BRANCH"
exit -1
fi

echo "branch=$GIT_BRANCH"
GIT_BRANCH=${GIT_BRANCH/origin\/}
DOCKER_TAG="${GIT_BRANCH/refs\/tags\/}"

if [[ $DOCKER_TAG == "master" ]] ; then
echo "skip building latest tag!"
echo "... use 'tag_image.sh' script to release a new version. See: https://github.com/ConSol/docker-headless-vnc-container/blob/master/how-to-release.md"
exit 0
fi

echo "DOCKER_TAG=$DOCKER_TAG"
echo "..."
echo "trigger dockerhub builds for Tag $DOCKER_TAG:"

URLS=(
Expand All @@ -11,20 +32,21 @@ URLS=(
)
PAYLOAD='{"source_type": "Tag", "source_name": "'$DOCKER_TAG'"}'

if [[ $DOCKER_TAG == "latest" ]] ; then
echo "DockerHub will not be triggered: use script 'tag_image.sh'"
#PAYLOAD='{"docker_tag": "'latest'"}'
exit 0
fi
# use docker tag instead of branch
if [[ $DOCKER_TAG == "dev" ]] ; then
PAYLOAD='{"docker_tag": "'dev'"}'
fi

# use first parameter to filter trigger command
IMAGENAME=$1

#Loop
for URL in "${URLS[@]}"
do
echo "URL: $URL"
echo "PAYLOAD: $PAYLOAD"
curl -H "Content-Type: application/json" --data "$PAYLOAD" -X POST "$URL"
echo " - done!"
if [ -z $IMAGENAME ] || [[ $URL =~ .*"$IMAGENAME".* ]] ; then
echo "URL: $URL"
echo "PAYLOAD: $PAYLOAD"
curl -H "Content-Type: application/json" --data "$PAYLOAD" -X POST "$URL"
echo " - done!"
fi
done
28 changes: 14 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ services:
language: generic

env:
- DISTRI=centos DESKTOP=Xfce4
- DISTRI=centos DESKTOP=IceWM
- DISTRI=ubuntu DESKTOP=Xfce4
- DISTRI=ubuntu DESKTOP=IceWM
- DISTRI=ubuntu DESKTOP=xfce
- DISTRI=ubuntu DESKTOP=icewm
- DISTRI=centos DESKTOP=xfce
- DISTRI=centos DESKTOP=icewm

script:
- 'if [ ${DISTRI} == "centos" ] && [ ${DESKTOP} == "Xfce4" ]; then
docker build -t centos-xfce-vnc -f ./Dockerfile.centos.xfce.vnc . ;
elif [ ${DISTRI} == "centos" ] && [ ${DESKTOP} == "IceWM" ]; then
docker build -t centos-icewm-vnc -f ./Dockerfile.centos.icewm.vnc . ;
elif [ ${DISTRI} == "ubuntu" ] && [ ${DESKTOP} == "Xfce4" ]; then
docker build -t ubuntu-xfce-vnc -f ./Dockerfile.ubuntu.xfce.vnc . ;
else
docker build -t ubuntu-icewm-vnc -f ./Dockerfile.ubuntu.icewm.vnc . ;
fi'
- docker build -t local/${DISTRI}-${DESKTOP}-vnc -f ./Dockerfile.${DISTRI}.${DESKTOP}.vnc .
after_success:
- bash .build/trigger_dockerhub.sh ${DISTRI}-${DESKTOP}-vnc

## use standard notification to committer
#notifications:
# recipients:
# - "[email protected]"
# on_success: change # default: change
# on_failure: always # default: always
4 changes: 2 additions & 2 deletions Dockerfile.centos.icewm.vnc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

FROM centos:7

MAINTAINER Tobias Schneck "tobias.schneck@consol.de"
ENV REFRESHED_AT 2018-03-27
MAINTAINER Simon Hofmann "simon.hofmann@consol.de"
ENV REFRESHED_AT 2018-10-29

LABEL io.k8s.description="Headless VNC Container with IceWM window manager, firefox and chromium" \
io.k8s.display-name="Headless VNC Container based on Centos" \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.centos.xfce.vnc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

FROM centos:7

MAINTAINER Tobias Schneck "tobias.schneck@consol.de"
ENV REFRESHED_AT 2018-03-27
MAINTAINER Simon Hofmann "simon.hofmann@consol.de"
ENV REFRESHED_AT 2018-10-29

LABEL io.k8s.description="Headless VNC Container with Xfce window manager, firefox and chromium" \
io.k8s.display-name="Headless VNC Container based on Centos" \
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile.ubuntu.icewm.vnc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

FROM ubuntu:16.04

MAINTAINER Tobias Schneck "tobias.schneck@consol.de"
ENV REFRESHED_AT 2018-03-27
MAINTAINER Simon Hofmann "simon.hofmann@consol.de"
ENV REFRESHED_AT 2018-10-29

LABEL io.k8s.description="Headless VNC Container with IceWM window manager, firefox and chromium" \
io.k8s.display-name="Headless VNC Container based on Ubuntu" \
Expand Down Expand Up @@ -41,6 +41,9 @@ RUN find $INST_SCRIPTS -name '*.sh' -exec chmod a+x {} +
RUN $INST_SCRIPTS/tools.sh
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

### Install custom fonts
RUN $INST_SCRIPTS/install_custom_fonts.sh

### Install xvnc-server & noVNC - HTML5 based VNC viewer
RUN $INST_SCRIPTS/tigervnc.sh
RUN $INST_SCRIPTS/no_vnc.sh
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile.ubuntu.xfce.vnc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

FROM ubuntu:16.04

MAINTAINER Tobias Schneck "tobias.schneck@consol.de"
ENV REFRESHED_AT 2018-03-27
MAINTAINER Simon Hofmann "simon.hofmann@consol.de"
ENV REFRESHED_AT 2018-10-29

LABEL io.k8s.description="Headless VNC Container with Xfce window manager, firefox and chromium" \
io.k8s.display-name="Headless VNC Container based on Ubuntu" \
Expand Down Expand Up @@ -41,6 +41,9 @@ RUN find $INST_SCRIPTS -name '*.sh' -exec chmod a+x {} +
RUN $INST_SCRIPTS/tools.sh
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

### Install custom fonts
RUN $INST_SCRIPTS/install_custom_fonts.sh

### Install xvnc-server & noVNC - HTML5 based VNC viewer
RUN $INST_SCRIPTS/tigervnc.sh
RUN $INST_SCRIPTS/no_vnc.sh
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ If you open some graphic/work intensive websites in the Docker container (especi

Thx @raghavkarol for the hint!

## How to release
See **[how-to-release.md](./how-to-release.md)**

## Contributors

At this point we want to thank all contributors, which helped to move this great project by submitting code, writing documentation, or adapting other tools to play well together with the docker headless container.
Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## Changelog of the Docker headless VNC images

### Version 1.4.0:
* added Github issue and pull request templates
* added install script for custom fonts ([#83](https://github.com/ConSol/docker-headless-vnc-container/issues/83)))
* fixed problem that VNC password was not properly set after doing a Docker commit ([#88](https://github.com/ConSol/docker-headless-vnc-container/issues/88))
* fixed some typos ([#87](https://github.com/ConSol/docker-headless-vnc-container/issues/87))
* added 'how-to-release' info ([#75](https://github.com/ConSol/docker-headless-vnc-container/issues/75))
* added Travis build ([#74](https://github.com/ConSol/docker-headless-vnc-container/issues/74))

### Version 1.3.0:
* change default USER to `1000` ([#61](https://github.com/ConSol/docker-headless-vnc-container/issues/61))
* refactor vnc startup script ([#73](https://github.com/ConSol/docker-headless-vnc-container/issues/73))
Expand Down
20 changes: 20 additions & 0 deletions how-to-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# How to release

* Check if `changelog.md` is correct
* Check if all features are merged in dev and pushed
* Pull the latest `dev` images

.build/tag_image.sh dev 1.x.x --save

* Test if the latest `dev` build is usable
* Change the the `FROM` statement in Sakuli `Dockerfile` to `dev` tag (in separate branch) and run (after build on dockerhub) [`docker/.build/tag_image.sh --save`](https://github.com/ConSol/sakuli/blob/master/docker/.build/tag_image.sh)

* On success - push the tested `dev` images to dockerhub

.build/tag_image.sh dev 1.x.x
.build/tag_image.sh dev latest

* Merge `dev` branch to `master`

* Create a release on [github.com/ConSol/docker-headless-vnc-container/releases/new](https://github.com/ConSol/docker-headless-vnc-container/releases/new)
* Write a blog post for [labs.consol.de](https://labs.consol.de/)
6 changes: 1 addition & 5 deletions src/centos/install/chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
set -e

echo "Install Chromium Browser"

#TODO use temporally epel-testing repo to fix chrome version 60.0.3112.113-2.el7
yum-config-manager --enable epel-testing
yum -y install chromium chromium-libs chromium-libs-media
yum-config-manager --enable epel-testing

yum clean all

ln -s /usr/bin/chromium-browser /usr/bin/google-chrome

### fix to start chromium in a Docker container, see https://github.com/ConSol/docker-headless-vnc-container/issues/2
Expand Down
2 changes: 1 addition & 1 deletion src/centos/install/libnss_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ echo "Install nss-wrapper to be able to execute image as non-root user"
yum -y install nss_wrapper gettext
yum clean all

echo "add 'souce generate_container_user' to .bashrc"
echo "add 'source generate_container_user' to .bashrc"

# have to be added to hold all env vars correctly
echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
2 changes: 1 addition & 1 deletion src/common/install/set_user_permission.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
### every exit != 0 fails the script
set -e
if [[ -z $DEBUG ]]; then
if [[ -n $DEBUG ]]; then
verbose="-v"
fi

Expand Down
6 changes: 6 additions & 0 deletions src/common/scripts/vnc_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ echo -e "\n------------------ change VNC password ------------------"
# first entry is control, second is view (if only one is valid for both)
mkdir -p "$HOME/.vnc"
PASSWD_PATH="$HOME/.vnc/passwd"

if [[ -f $PASSWD_PATH ]]; then
echo -e "\n--------- purging existing VNC password settings ---------"
rm -f $PASSWD_PATH
fi

if [[ $VNC_VIEW_ONLY == "true" ]]; then
echo "start VNC server in VIEW ONLY mode!"
#create random pw to prevent access
Expand Down
6 changes: 6 additions & 0 deletions src/ubuntu/install/install_custom_fonts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
### every exit != 0 fails the script
set -e

echo "Installing ttf-wqy-zenhei"
apt-get install -y ttf-wqy-zenhei
2 changes: 1 addition & 1 deletion src/ubuntu/install/libnss_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apt-get update
apt-get install -y libnss-wrapper gettext
apt-get clean -y

echo "add 'souce generate_container_user' to .bashrc"
echo "add 'source generate_container_user' to .bashrc"

# have to be added to hold all env vars correctly
echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
2 changes: 1 addition & 1 deletion src/ubuntu/install/xfce_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -e

echo "Install Xfce4 UI components"
apt-get update
apt-get install -y supervisor xfce4 xfce4-terminal
apt-get install -y supervisor xfce4 xfce4-terminal xterm
apt-get purge -y pm-utils xscreensaver*
apt-get clean -y

0 comments on commit 095d9bb

Please sign in to comment.