You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by "Eric Landry (JIRA)" <ji...@apache.org> on 2017/10/04 13:06:03 UTC

[jira] [Commented] (GUACAMOLE-374) Installing Guacamole with Docker improvements

    [ https://issues.apache.org/jira/browse/GUACAMOLE-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191215#comment-16191215 ] 

Eric Landry commented on GUACAMOLE-374:
---------------------------------------

Here's mine with Postgres (Assuming a recent docker-ce/docker-compose)

Create the DB initialization script:
{noformat}
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres > initdb.sql
{noformat}

In the same folder as the initdb.sql, create the docker-compose file:
{code:title=docker-compose.yml}
version: "3"
services:
  postgres:
    image: postgres
    environment:
      POSTGRES_DB: guacamole_db
      POSTGRES_USER: guacamole_user
      POSTGRES_PASSWORD: guacamole_password
    volumes:
      - ./initdb.sql:/docker-entrypoint-initdb.d/initdb.sql
  guacd:
    image: guacamole/guacd
    expose:
      - 4822
  guacamole:
    image: guacamole/guacamole
    environment:
      GUACD_HOSTNAME: guacd
      GUACD_PORT: 4822
      POSTGRES_HOSTNAME: postgres
      POSTGRES_DATABASE: guacamole_db
      POSTGRES_USER: guacamole_user
      POSTGRES_PASSWORD: guacamole_password
    links:
      - postgres
      - guacd
    ports:
      - 8080:8080
{code}

Start docker-compose
{noformat}
docker-compose up
{noformat}


> Installing Guacamole with Docker improvements
> ---------------------------------------------
>
>                 Key: GUACAMOLE-374
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-374
>             Project: Guacamole
>          Issue Type: Improvement
>          Components: guacamole-docker
>    Affects Versions: 0.9.13-incubating
>         Environment: sven@fangorn:~$ docker version
> Client:
>  Version:      17.06.1-ce
>  API version:  1.30
>  Go version:   go1.8.3
>  Git commit:   874a737
>  Built:        Thu Aug 17 22:51:12 2017
>  OS/Arch:      linux/amd64
> Server:
>  Version:      17.06.1-ce
>  API version:  1.30 (minimum version 1.12)
>  Go version:   go1.8.3
>  Git commit:   874a737
>  Built:        Thu Aug 17 22:50:04 2017
>  OS/Arch:      linux/amd64
>  Experimental: false
>            Reporter: Sven Gottwald
>
> I installed guacamole as docker container for the first time. Great software! I followed the guide on [https://guacamole.incubator.apache.org/doc/gug/guacamole-docker.html]. There is a lot of unnecessary work to get the container up and running, here are some suggestions to improve the documentation:
> # The link flag is a deprecated legacy feature of Docker. It may eventually be removed. [Legacy container links |https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/]. It is no problem to get guacamole running with a user defined network.
> # The database should be generated automatically on first run. The user and database could be automatically created by [mariadb|https://hub.docker.com/_/mariadb/].
> # ...You should add mariadb as possible backend.
> # Due to its complexity (three services) you should provide a {{docker-compose.yml}} file for use with [docker-compose|https://docs.docker.com/compose/]. This also creates an user defined network.
> Here is an example {{docker-compose.yml}} for use with mariadb:
> {noformat}
> version: '3'
> services:
>   guacd:
>     image: guacamole/guacd
>     depends_on:
>       - db
>   guac:
>     image: guacamole/guacamole
>     ports:
>       - 8080:8080
>     depends_on:
>       - db
>       - guacd
>     environment:
>       - GUACD_HOSTNAME=guacd
>       - MYSQL_PASSWORD=x
>       - MYSQL_DATABASE=guacamole_db
>       - MYSQL_USER=guacamole_user
>       - MYSQL_HOSTNAME=db
>   db:
>     image: mariadb
>     volumes:
>       - /srv/docker/guacamole-mysql:/var/lib/mysql
>     environment:
>       - MYSQL_ROOT_PASSWORD=x
>       - MYSQL_PASSWORD=x
>       - MYSQL_DATABASE=guacamole_db
>       - MYSQL_USER=guacamole_user
> {noformat}
> I don't know why, but {{GUACD_HOSTNAME}} and {{MYSQL_HOSTNAME}} are needed (maybe a bug?)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)