I'm packaging and shipping a custom code base of Wordpress with a Dockerfile in to my private container registry.
FROM wordpress:latest ADD . /var/www/html
Then on the deployment server I just use
docker-compose.yml and grab my custom image.
and also I'm mounting this needed directory to host.
volumes: - .:/var/www/html
Container starts and runs without any hustle. However the problem is the code (files, directories) I ported earlier doesn't show on the deployment. Only the official
wordpress:latest data are there.
What I'm missing here?
Then I tried something like this. Instead of directly
ADD . /var/www/html/, I copied code base to another directory
ADD . /app on build and on the deployment docker-compose.yml, I tried to
cp -a /app/. /var/www/html with a
command parameter. Command and
cp works. However it happens before
wordpress:latest script runs and it avoid coping official wordpress files, which I don't want. I expect some official files from
wordpress:latest to be copied to the
/var/www/html/ then my customer data to be copied from
Whats the missing ingredient here?
However in that case