<p>i am using GKE kubernetes cluster and created the wordpress docker image.</p>

<p>Docker file:</p>

<pre><code>FROM wordpress:php7.1-apache
COPY /web /var/www/html
RUN ls
WORKDIR /var/www/html
EXPOSE 80
</code></pre>

<p>Deployment.yaml</p>

<pre><code>volumeMounts:
        - name: wordpress-content-data
          mountPath: /var/www/html/
</code></pre>

<p>When i try to mount a pvc with this docker image all the data inside it going empty and folder 'lost+found' added to path. i want all the data inside 'html' folder in PVC and also when new deployment come of wordpress data should be there only changed filer will overwrite.</p>

<p>i am also thinking to add CI/CD for docker image so please suggest answer to resolve this issue.</p>

Harsh Manvar
<p>There are plenty of good articles, describing how to configure and deploy  wordpress on GKE with data persistence.</p>

<p><a href="http://gmacario.github.io/2018/10/17/deploy-wordpress-mysql-on-pvc.html" rel="nofollow noreferrer">Deploying WordPress and MySQL with Persistent Volumes on GKE</a> works fine. You can use this manual as an example of successful installation.</p>
