Answer the question
In order to leave comments, you need to log in
Where do files go when docker-compose build?
There is docker-compose.yaml:
version: "3.1"
services:
php-fpm:
build:
context: phpdocker/php-fpm
args:
- GITLAB_USER
- GITLAB_DEPLOY_TOKEN
container_name: project-local-php-fpm
working_dir: /application
volumes:
- ./app:/application
- ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.1/fpm/conf.d/99-overrides.ini
- ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.1/cli/conf.d/99-overrides.ini
FROM phpdockerio/php71-fpm:latest
WORKDIR "/application"
# Install selected extensions and other stuff
RUN apt-get update \
&& apt-get -y --no-install-recommends install php-memcached php7.1-pgsql php-redis php7.1-bcmath php7.1-gd php7.1-gmp php7.1-imap php-imagick php7.1-soap php-ssh2 php-yaml php-xdebug php7.1-dev make wget \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
# Install git
RUN apt-get update \
&& apt-get -y install git \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
ARG GITLAB_USER
ARG GITLAB_DEPLOY_TOKEN
#install application
RUN git clone --progress --verbose http://$GITLAB_USER:[email protected]/project.git . \
&& git checkout -b develop origin/develop \
&& composer install
docker-compose build --build-arg GITLAB_USER=ololo --build-arg GITLAB_DEPLOY_TOKEN=trololo
Answer the question
In order to leave comments, you need to log in
The volumes specified in docker-compose.yml
are mounted at startup, not when the container is built.
Either nothing, or dependency packages, or a complete set should get into the image, in the first 2 options, the missing should be monitored from the host.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question