Hi Tezarin,

I'm a bit confused about what you actually want to achieve. The
docker-compose.yml example that I pointed you to is similar to the file I
use on a local VM.

If you want to get to a docker-compose.yml that works for you then you
might want to start with a basic .yml file that starts your Guacamole
containers and allows you to login, which is pretty much what my example
does, except that I use a PostgreSQL container which provides a mechanism
to create a database from a script on container startup. After that, you
could add LDAP configuration and whatever else you need incrementally.

If you look at the guac-postgres container part of my example, you will see
that I create a volume which points to an init-scripts folder on my host.
When the Postgres container is created the script(s) in the init-scripts
folder get run and the Guacamole database is initialised. The script in my
init-scripts folder contains all of the SQL statements needed to create the
users, permissions, tables etc. that Guacamole requires. Once the
containers are up and running I restore from a database backup into the new
database and test that everything works.

Since I don't use MySQL, I'm not sure whether or not you can do the same
sort of initialisation. However, in order to use docker-compose, you are
going to have to perform some sort of database initialisation so that the
Guacamole client container has everything it needs when it is started. If
your database is not set up correctly then your Guacamole client container
will probably stop after a very short time or not perform as you expect. If
you look in the Docker logs for the container then you will likely see
errors relating to the database.

Your initial question was about making sure that you have up to date
Guacamole Docker images. I would suggest that you pull specific tagged
images rather than relying on the latest image. What you need is a
combination of containers that is known to work together, but if you don't
pull specific tagged images then you might arrive at a situation, as it
seems you already did, where a particular image version is incompatible. Of
course, you might have to experiment in order to arrive at a satisfactory
combination of images.

If you have a docker-compose.yml file then you can easily update it with
new image versions and test whether they work together or not.

On Fri, 29 Jun 2018 at 16:54, Tezarin <[email protected]> wrote:

>  Hi Chris and everyone,
>
> I looked at your repo and tried to come up with my own. I created a
> docker-compose.yml and also a Dockerfile  (below). It is  my first time so
> please let me know if I did it correctly. Thanks
> docker-compose.yml:
> version: '1'
> services:  db:    hostname: *****.rds.amazonaws.com    build:
> context: .    restart: always    volumes:      - data:/var/lib/mysql
> environment:      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
> MYSQL_DATABASE=${MYSQL_DATABASE}      MYSQL_USER: ${MYSQL_USER}
>   guacd:    hostname: guacd    image: guacamole/guacd    restart: always
>   guacamole:    image: image/guacamole:latest    restart: always
> ports:      - "8443:8443"    links:      - guacd      - db    environment:
>     GUACD_HOSTNAME: guacd      MYSQL_HOSTNAME: *****.rds.amazonaws.com
>   MYSQL_DATABASE: guacamole      MYSQL_USER: guacamole      MYSQL_PASSWORD:
> --Removed--      LDAP_HOSTNAME='--Removed--'
> LDAP_USER_BASE_DN='--Removed--'       LDAP_PORT='389'
> LDAP_CONFIG_BASE_DN=''      LDAP_DEREFERENCE_ALIASES='always'
> LDAP_ENCRYPTION_METHOD='none'      LDAP_FOLLOW_REFERRALS='always'
> LDAP_GROUP_BASE_DN='--Removed--'
> LDAP_SEARCH_BIND_DN='cn=--Removed--'
> LDAP_SEARCH_BIND_PASSWORD='--Removed--'
> LDAP_USER_SEARCH_FILTER='(&(objectClass=person)(objectClass=user)'
> LDAP_USERNAME_ATTRIBUTE='samAccountNa
> volumes:  data: guacd-volume
>
> -------------------------
> Dockerfile:
>
> FROM guacamole/guacamole
> RUN apt-get update && apt-get install -y vim \
> && sed -i 's/redirectPort="8443"/redirectPort="8443" server=""
> secure="true"/g' /usr/local/tomcat/conf/server.xml \&& sed -i 's/<Server
> port="8005" shutdown="SHUTDOWN">/<Server port="-1" shutdown="SHUTDOWN">/g'
> /usr/local/tomcat/conf/server.xml \&& rm -rf
> /usr/local/tomcat/webapps/docs/*  \&& rm -rf
> /usr/local/tomcat/webapps/examples/*  \&& rm -rf
> /usr/local/tomcat/webapps/manager/*  \&& rm -rf
> /usr/local/tomcat/webapps/host-manager/* \  RUN chmod -R 400
> /usr/local/tomcat/conf
> ENV MYSQL_HOSTNAME='*****.rds.amazonaws.com' \
> MYSQL_DATABASE='guacamole' \    MYSQL_USER='guacamole' \
> MYSQL_PASSWORD='--Removed--' \    LDAP_HOSTNAME='--Removed--' \
> LDAP_USER_BASE_DN='--Removed--' \    LDAP_PORT='389' \
> LDAP_CONFIG_BASE_DN=''\    LDAP_DEREFERENCE_ALIASES='always' \
> LDAP_ENCRYPTION_METHOD='none' \    LDAP_FOLLOW_REFERRALS='always' \
> LDAP_GROUP_BASE_DN='--Removed--' \    LDAP_SEARCH_BIND_DN='--Removed--' \
>   LDAP_SEARCH_BIND_PASSWORD='--Removed--' \
> LDAP_USER_SEARCH_FILTER='(&(objectClass=person)(objectClass=user)' \
> LDAP_USERNAME_ATTRIBUTE='samAccountName' \
> GUACAMOLE_HOME=/opt/guacamole-home \
> COPY server.xml /usr/local/tomcat/confEXPOSE 8443ENTRYPOINT
> ${GUACAMOLE_HOME}
> CMD [/bin/sh -c]
>
>
>     On Monday, June 18, 2018, 7:10:37 PM EDT, Tezarin <[email protected]>
> wrote:
>
>  Thanks for sharing Chris, I'll take a look, just want to make sure it
> pulls the new image every time we run it.
>
> Sent from my iPad
>
> > On Jun 18, 2018, at 5:24 PM, Chris Duncan <[email protected]> wrote:
> >
> > Don't know if this is any use, but here is a gist with my sample
> > docker-compose.yml:
> >
> > https://gist.github.com/celldee/0530d61d405b91107d8f9b12b0813e27
> >
> >> On Mon, 18 Jun 2018, 22:17 Tezarin, <[email protected]> wrote:
> >>
> >> Thank you Mike and Nick, docker-compose would probably be what I'm
> >> looking for, I basically would like the file to get the images (so it
> does
> >> a docker pull every time I run its which ensures the image is always
> latest
> >> ), then adds my customization (i.e. I expose 8443 instead of 8080, etc.)
> >>    On Monday, June 18, 2018, 5:05:00 PM EDT, Mike Jumper <
> >> [email protected]> wrote:
> >>
> >> On Mon, Jun 18, 2018 at 9:37 AM, Tezarin <[email protected]>
> >> wrote:
> >>
> >>> ... And also, do you happen to have a Git repo with your official
> >>> Guacomole repo and Dockerfile?
> >>>
> >>
> >> The Dockerfiles for the "guacamole/guacamole" and "guacamole/guacd"
> Docker
> >> images are part of the guacamole-client and guacamole-server source
> >> respectively:
> >>
> >> https://github.com/apache/guacamole-client
> >> https://github.com/apache/guacamole-server
> >>
> >> - Mike
> >>



-- 
*Regards,*

*Chris*

Reply via email to