Hello,
i have some issue with installation in docker. I have installed and looks good. But when I restart my pc or restart docker i need to install xwiki once again. Is any option to keep all data?
Can you share the docker command line you use to run xwiki? My guess is that the volume mapping for the perm dir is not correct.
Thanks for quick answer!
I install xwiki from this link:
So, i used a command: docker run --net=xwiki-nw --name xwiki -p 8080:8080 -v /my/path/xwiki:/usr/local/xwiki -e DB_USER=xwiki -e DB_PASSWORD=xwiki -e DB_DATABASE=xwiki -e DB_HOST=mysql-xwiki xwiki:lts-mysql-tomcat
Perhabs I understand my mistake about mapping volume. I need to set my path (/my/path/ → C:\xwiki) - for example. Thanks for advice!
Here my docker-compose.yml content :
version: '2.4'
services:
xwiki:
image: ${XWIKI_IMAGE_NAME}
privileged: true
container_name: ${XWIKI_CONTAINER_NAME}
ports:
- "${XWIKI_PORT_CONTAINER}:8080"
volumes:
- /etc/hosts:/etc/hosts
- /var/lib/docker_mapping/xwiki/${XWIKI_NUMBER}/data:/usr/local/xwiki/data
- /var/lib/docker_mapping/xwiki/${XWIKI_NUMBER}/logback.xml:/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/logback.xml
- /var/lib/docker_mapping/xwiki/${XWIKI_NUMBER}/tomcat/logs:/usr/local/tomcat/logs
- /var/lib/docker_mapping/xwiki/${XWIKI_NUMBER}/setenv.sh:/usr/local/tomcat/bin/setenv.sh
- /var/lib/docker_mapping/xwiki/${XWIKI_NUMBER}/tomcat/conf/logging.properties:/usr/local/tomcat/conf/logging.properties
mem_limit: ${XWIKI_MEM_LIMIT}
memswap_limit: ${XWIKI_MEMSWAP_LIMIT}
cpus: ${XWIKI_CPUS}
environment:
DB_USER: ${XWIKI_DB_USER}
DB_PASSWORD: ${XWIKI_DB_PASSWORD}
DB_DATABASE: ${XWIKI_DB_DATABASE}
DB_HOST: ${XWIKI_DB_HOST}
http_proxy: ${XWIKI_HTTP_PROXY}
https_proxy: ${XWIKI_HTTPS_PROXY}
no_proxy: ${XWIKI_NO_PROXY}
JAVA_OPTS: ${XWIKI_JAVA_OPTS}
network_mode: bridge
You probably have forgotten the line " - /var/lib/docker_mapping/xwiki/${XWIKI_NUMBER}/data:/usr/local/xwiki/data". The right side of the “:” is the path of data inside the container.
The container is a Linux image so you have to respect the path notation for Linux.
Regards.
Camille