I am trying to setup a docker image for Drupal site and integrate with apigee edge so that I can use it in jenkins job so that whenever I do customization in my Drupal portal, get it deployed automatically. Below is the docker file which I have created
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM drupal:8-apache
ARG ADMIN_USER
ARG ADMIN_PASS
ARG DB_URL
# install dependencies
RUN apt-get update
RUN apt-get update && apt-get install -y curl \
git ranger unzip vim sqlite3 postgresql-client libmagick++-dev \
libmagickwand-dev libpq-dev libfreetype6-dev \
libjpeg62-turbo-dev libpng-dev libwebp-dev libxpm-dev
RUN docker-php-ext-configure gd --with-jpeg=/usr/include/ \
--with-freetype=/usr/include/
RUN docker-php-ext-install gd bcmath
# install and setup drupal tools
RUN echo "memory_limit = -1;" > /usr/local/etc/php/php.ini
WORKDIR /var/www
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/local/bin/composer
#RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
#RUN php composer-setup.php
#RUN rm composer-setup.php
#RUN mv composer.phar /usr/bin/composer
# create project
RUN composer create-project drupal-composer/drupal-project:8.x-dev portal --stability dev --no-interaction
RUN echo "Project Created"
# install dependencies
WORKDIR /var/www/portal
#RUN composer require drupal/apigee_m10n drupal/restui drush/drush:8.*
RUN composer require drupal/restui drush/drush:8.*
RUN echo "Dependence Updated"
RUN yes | ./vendor/drush/drush/drush init
RUN echo "About configure Apache"
# configure apache
RUN sed -i 's/DocumentRoot .*/DocumentRoot \/var\/www\/portal\/web/' /etc/apache2/sites-available/000-default.conf
RUN mkdir -p /var/www/portal/web/sites/default/files
#COPY ./web /var/www/portal/web
# perform site install
WORKDIR /var/www/portal/web
#RUN ../vendor/drush/drush/drush si apigee_devportal_kickstart --db-url="$DB_URL" --site-name="Apigee Developer Portal" --account-name="$ADMIN_USER" --account-pass="$ADMIN_PASS" --no-interaction
#RUN ../vendor/drush/drush/drush si apigee_devportal_kickstart --db-url="$DB_URL" --site-name="Apigee Developer Portal" --account-name="$ADMIN_USER" --account-pass="$ADMIN_PASS" --no-interaction
# enable dependencies
#RUN yes | ../vendor/drush/drush/drush en rest restui basic_auth
# configure apigee connection credentials from environment variables
#RUN ../vendor/drush/drush/drush config:set key.key.apigee_edge_connection_default key_provider apigee_edge_environment_variables --no-interaction
#RUN yes | ../vendor/drush/drush/drush cim --partial --source=$(pwd)/config
COPY ./modules/apigee_modules ./modules/apigee_modules
COPY ./core ./core
# set up private filesystem
RUN mkdir -p /var/www/private
RUN usermod -aG root www-data
RUN chmod g+r,g+w /var/www/private
RUN echo "\$settings['file_private_path'] = '/var/www/private';" >> /var/www/portal/web/sites/default/settings.php
# set permissions
WORKDIR /var/www/portal
ADD ./set-permissions.sh ./set-permissions.sh
RUN chmod +x ./set-permissions.sh && ./set-permissions.sh --drupal_path=$(pwd)/web --drupal_user=root --httpd_group=www-data
RUN chmod 777 /var/www/portal/web/sites/default/settings.php
# import configuration files for rest module
WORKDIR /var/www/portal/
ADD ./config ./config
run chmod 777 ./config
#RUN mkdir ./config/sync
After building the image and running the build, I am able to create the developer portal site. however, Not able to congiure apigee edge related configuration as it is not showing in drupal site. also If I uncommet the config setting code (