I’m attempting to change the admin login for an existing kartoza/geoserver docker container. I’ve followed the instructions here: https://hub.docker.com/r/kartoza/geoserver
The GEOSERVER_ADMIN_PASSWORD and GEOSERVER_ADMIN_USER are set and visible with env in the container and I have mounted the volume settings:/settings in my docker-compose.yml. Yet when I stop and restart the service the password is always the default. Any suggestions?
I am using version 2.20.0
Thanks,
···
Brian Jubelirer
I’ve followed the geoserver docker page: GitHub - geoserver/docker: GeoServer docker image
And the GEOSERVER_ADMIN_PASSWORD env parameter is not working.
My docker compose configs:
volumes:
- ${N_REPO}/conf/geoserver/geoserver_data:/opt/geoserver_data
- ${N_REPO}/conf/geoserver/additional_libs:/opt/additional_libs
- ${N_REPO}/conf/geoserver/config_overrides:/opt/config_overrides
- ${N_REPO}/conf/geoserver/additional_fonts:/opt/additional_fonts
environment:
- GEOSERVER_ADMIN_PASSWORD=lalala
- WEBAPP_CONTEXT=/geoserver
- SKIP_DEMO_DATA=true
- INSTALL_EXTENSIONS=true
- STABLE_EXTENSIONS=control-flow,css,oracle,printing,querylayer
Is this a bug or am i missing something?
Thanks
Found it on the startup.sh inside geoserver image:
if [ -n "$GEOSERVER_ADMIN_PASSWORD" ] && [ -n "$GEOSERVER_ADMIN_USER" ]; then
/bin/sh /opt/update_credentials.sh
fi
So, it’s always mandatory to set both variables to change the user or password.