0% found this document useful (0 votes)
9 views2 pages

Docker With NFS

This document outlines the steps to deploy a Docker volume using a Network File System (NFS). It includes creating a script for the NFS server, installing necessary packages on the client, creating a Docker volume with specific options, running a container with environment variables, and accessing the container to check its configuration. The instructions are aimed at setting up a WordPress container with an NFS-backed volume.

Uploaded by

suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Docker With NFS

This document outlines the steps to deploy a Docker volume using a Network File System (NFS). It includes creating a script for the NFS server, installing necessary packages on the client, creating a Docker volume with specific options, running a container with environment variables, and accessing the container to check its configuration. The instructions are aimed at setting up a WordPress container with an NFS-backed volume.

Uploaded by

suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DOCKER VOLUME WITH NETWORK FILE SYSTEM

step 1: create a script to automate the deployment of nfs-server

step 2: download nfs-common pacakges on client machine

step 3: create a docker volume using following command

docker volume create --driver local --opt type=nfs --opt


o=addr=172.30.1.2,rw --opt device=:/unnati wordpress

step 4: now run container whatever you wont with proper environment
variables and attach created volume to that container as follows

docker run --name=wp1 -e WORDPRESS_DB_HOST=unnati -e


WORDPRESS_DB_PASSWORD=redhat -e
WORDPRESS_DB_NAME=ubuntu -v wordpress:/var/www/html -p
18080:80 -d wordpress
step 5: access created container check configuration as follows

You might also like