Im trying to build wordpress theme with docker & docker-compose. The problem that Im having is that Im trying to copy my theme into exposed wp-content folder of docker but for some reason it says there is not such file or directory.
Runing ls command my folder structure looks like this:
wp-content // available only after docker compose finishes theme dockerFile docker-compose.yaml
Here is how my docker-compose.yaml file looks like
version: '3' services: # Database db: image: mysql:5.7 volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress networks: - wpsite # phpmyadmin phpmyadmin: depends_on: - db image: phpmyadmin/phpmyadmin restart: always ports: - '8080:80' environment: PMA_HOST: db MYSQL_ROOT_PASSWORD: password networks: - wpsite # WordPress wordpress: build: . depends_on: - db ports: - '8000:80' restart: always volumes: - ./wp-content/:/var/www/html/wp-content environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress networks: - wpsite networks: wpsite: volumes: db_data:
And here how my DockerFile looks like
FROM wordpress:latest RUN echo "Install wordpress" COPY ./giveaway_theme ./wp-content/themes RUN echo "Copy theme to wp-content folder"
Looks like im somehow inside container, because when I run ls command it shows nothing,
So my question is is there any way that I can copy theme into wp-content folder after docker compose finishes ??