$ docker run -d -name wordpress -p 80:8080 -p 443:8443 \ -env WORDPRESS_PASSWORD=my_password \ -network wordpress-tier \ -volume /path/to/wordpress-persistence:/bitnami \ bitnami/wordpress-nginx:latestĪvailable environment variables: User and Site configuration This requires a minor change to the docker-compose.yml file present in this repository: Mount host directories as data volumes with Docker Compose Alternatively you can make use of volume plugins to host the volume data. To avoid inadvertent removal of volumes, you can mount host directories as data volumes. The WordPress application state will persist as long as volumes are not removed. The above examples define the Docker volumes named mariadb_data and wordpress_data. Additionally you should mount a volume for persistence of the MariaDB data. If the mounted directory is empty, it will be initialized on the first run. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.įor persistence you should mount a directory at the /bitnami/wordpress path. If you remove the container all your data will be lost, and the next time you run the image the database will be reinitialized. $ docker run -d -name wordpress \ -p 8080:8080 -p 8443:8443 \ -env ALLOW_EMPTY_PASSWORD=yes \ -env WORDPRESS_DATABASE_USER=bn_wordpress \ -env WORDPRESS_DATABASE_PASSWORD=bitnami \ -env WORDPRESS_DATABASE_NAME=bitnami_wordpress \ -network wordpress-network \ -volume wordpress_data:/bitnami/wordpress \ bitnami/wordpress-nginx:latestĪccess your application at Persisting your application $ docker volume create -name wordpress_data
The recommended way to get the Bitnami WordPress with NGINX Docker Image is to pull the prebuilt image from the Docker Hub Registry. Subscribe to project updates by watching the bitnami/wordpress-nginx GitHub repo. Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags in our documentation page. Supported tags and respective Dockerfile links Learn more about non-root containers in our docs.
However, because they run as a non-root user, privileged tasks are typically off-limits. Non-root container images add an extra layer of security and are generally recommended for production environments.
All our images are based on minideb a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading Linux distribution.Bitnami containers, virtual machines and cloud images use the same components and configuration approach - making it easy to switch between formats based on your project needs.With Bitnami images the latest bug fixes and features are available as soon as possible.Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems.You are encouraged to change the insecure default credentials and check out the available configuration options in the Environment Variables section for a more secure deployment. Warning: This quick setup is only intended for development environments.