You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
podman pod create \
--name YOUR_POD_NAME \
-p 8080:8080
Create database initialization scripts
# the directory the database container will scan for initialization scripts
mkdir -p "guacamole-db/docker-entrypoint-initdb.d"
# files are scanned in order
# create the user and database first and initialize it next
# localhost doesn't work for the user with podman; must be 127.0.0.1
echo "CREATE USER 'YOUR_GUACAMOLE_USERNAME'@'127.0.0.1' IDENTIFIED BY 'YOUR_GUACAMOLE_PASSWORD';" > guacamole-db/docker-entrypoint-initdb.d/01_initdb.sql
echo "CREATE DATABASE YOUR_GUACAMOLE_DATABASE_NAME;" >> guacamole-db/docker-entrypoint-initdb.d/01_initdb.sql
echo "GRANT ALL PRIVILEGES ON YOUR_GUACAMOLE_DATABASE_NAME.* TO 'YOUR_GUACAMOLE_USERNAME'@'127.0.0.1';" >> guacamole-db/docker-entrypoint-initdb.d/01_initdb.sql
echo "USE YOUR_GUACAMOLE_DATABASE_NAME;" > guacamole-db/docker-entrypoint-initdb.d/02_initdb.sql
podman run --rm docker.io/guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql >> guacamole-db/docker-entrypoint-initdb.d/02_initdb.sql
Create the database
# the directory the database stores its data in
mkdir guacamole-db/data
podman run -d \
--name=YOUR_DATABASE_CONTAINER_NAME \
--pod=YOUR_POD_NAME \
-e MARIADB_ROOT_PASSWORD=YOUR_DATABASE_ROOT_PASSWORD \
-v $(pwd)/guacamole-db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d \
-v $(pwd)/guacamole-db/data:/var/lib/mysql \
--restart unless-stopped \
docker.io/mariadb:latest