Skip to content

Commit

Permalink
Merge pull request #26 from MaxWaldorf/dev
Browse files Browse the repository at this point in the history
Upgrade to bullseye, pg13 and ghostscript
  • Loading branch information
MaxWaldorf authored May 13, 2022
2 parents 413d6e7 + d9e4c4c commit 9ced0aa
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 9 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/docker-image-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Docker Image CI for dev

on:
# Controls when the workflow will run
push:
branches: [ dev ]
pull_request:
branches: [ dev ]


# permissions are needed if pushing to ghcr.io
permissions:
packages: write

jobs:
build:
runs-on: ubuntu-latest
steps:
# Get the repository's code
- name: Checkout
uses: actions/checkout@v2
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
# Push to Docker Hub
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker meta
id: guac
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
maxwaldorf/guacamole
# Docker tags based on the following events/attributes
tags: |
type=schedule,pattern=nightly
type=raw,value=beta
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.guac.outputs.tags }}
labels: ${{ steps.guac.outputs.labels }}
4 changes: 1 addition & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
branches: [ main ]
tags:
- 'v*.*.*'
pull_request:
branches: [ main ]

# permissions are needed if pushing to ghcr.io
permissions:
Expand Down Expand Up @@ -57,4 +55,4 @@ jobs:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.guac.outputs.tags }}
labels: ${{ steps.guac.outputs.labels }}
labels: ${{ steps.guac.outputs.labels }}
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Select BASE
FROM tomcat:jdk15-openjdk-slim-buster
FROM tomcat:8.5-jdk8-openjdk-slim-bullseye

SHELL ["/bin/bash", "-c"]

ARG APPLICATION="guacamole"
ARG BUILD_RFC3339="2022-01-25T12:00:00Z"
Expand All @@ -8,6 +10,9 @@ ARG DESCRIPTION="Guacamole 1.4.0"
ARG PACKAGE="MaxWaldorf/guacamole"
ARG VERSION="1.4.0"
ARG TARGETPLATFORM
ARG PG_MAJOR="13"
# Do not require interaction during build
ARG DEBIAN_FRONTEND=noninteractive

STOPSIGNAL SIGKILL

Expand All @@ -31,9 +36,9 @@ ENV \
VERSION="${VERSION}"

ENV \
GUAC_VER=1.4.0 \
GUAC_VER=${VERSION} \
GUACAMOLE_HOME=/app/guacamole \
PG_MAJOR=11 \
PG_MAJOR=${PG_MAJOR} \
PGDATA=/config/postgres \
POSTGRES_USER=guacamole \
POSTGRES_DB=guacamole_db
Expand All @@ -42,10 +47,10 @@ ENV \
WORKDIR ${GUACAMOLE_HOME}

# Look for debian testing packets
RUN echo "deb http://deb.debian.org/debian buster-backports main contrib non-free" >> /etc/apt/sources.list
RUN echo "deb http://deb.debian.org/debian bullseye-backports main contrib non-free" >> /etc/apt/sources.list

#Add essential packages
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y curl postgresql-${PG_MAJOR}
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y curl postgresql-${PG_MAJOR} ghostscript

# Apply the s6-overlay
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCH=amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v6" ]; then ARCH=arm; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCH=armhf; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCH=aarch64; else ARCH=amd64; fi \
Expand All @@ -58,7 +63,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCH=amd64; elif [ "$TARGETPL
${GUACAMOLE_HOME}/extensions

# Install dependencies
RUN apt-get update && apt-get -t buster-backports install -y \
RUN apt-get update && apt-get -t bullseye-backports install -y \
build-essential \
libcairo2-dev libjpeg62-turbo-dev libpng-dev libtool-bin uuid-dev libossp-uuid-dev \
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev \
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Docker Guacamole

⚠️ **Starting version 1.4.2, compatibility with previous versions is broken due to Postgresql upgrade from 11 to 13!** <br />
ℹ️ Make sure to backup "guacamole_db" in postgres before upgrade to inject it later... <br />
<br />
<br />
**Disclaimer:** This work is based on the work of: https://github.com/oznu/docker-guacamole

A Docker Container for [Apache Guacamole](https://guacamole.apache.org/), a client-less remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH over HTML5.
Expand Down

0 comments on commit 9ced0aa

Please sign in to comment.