I am quite new working with docker. I tried to set up drupal via docker and docker-compose. So far i got a running instance and installed drupal via the installation script.
No i want to clone repositoires via the Dockerfile, which is a drupal module. So after cloning and rebuilding the module should appear in the admin/modzles page)
So i edited my
Dockerfile so it looks like this (the last few lines).
FROM drupal:7-apache RUN apt-get update && apt-get install -y \ curl \ git \ mysql-client \ vim \ wget RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ php composer-setup.php && \ mv composer.phar /usr/local/bin/composer && \ php -r "unlink('composer-setup.php');" RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.4.2/drush.phar && \ chmod +x drush.phar && \ mv drush.phar /usr/local/bin/drush RUN rm -rf /var/www/html/* COPY apache-drupal.conf /etc/apache2/sites-enabled/000-default.conf WORKDIR /app/web/sites/all/modules RUN git clone -b <branch> --single-branch \ https://<deploytoken>:<pw>@<gitlab-address>/<path-to-git-rep>.git \ WORKDIR /app
This is my
version: '3' services: db: image: mariadb:10.2 environment: MYSQL_DATABASE: drupal MYSQL_ROOT_PASSWORD: <pswd> volumes: - db_data:/var/lib/mysql restart: always drupal: depends_on: - db build: . ports: - "80:80" volumes: - ./app:/app restart: always volumes: db_data:
Then i used docker-compose build and docker-compose up. It looks like the repository gets cloned and the latest images is used (no errors) but the repository is not in the folder. What did i do wrong?