php - Copying bin files to docker container leads to error -
i'm trying setup docker-compose
system i'd copy dev tools /usr/local/bin/
on startup.
thats docker-compose.yml
:
version: '3' services: web: build: docker/container/nginx ports: - 4000:80 volumes: &m2volume - ./src:/var/www/html/ - ./docker/data/bin/:/usr/local/bin/ - ~/.composer:/var/www/.composer networks: &m2network - www links: - "php" - "mariadb:mysql" mariadb: image: mariadb ports: - 8001:3306 networks: *m2network ports: - "3307:3306" environment: mysql_root_password: magento2 mysql_database: db mysql_user: magento2 mysql_password: magento2 volumes: - ./docker/container/db/docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d/ - ./docker/container/db/conf.d:/etc/mysql/conf.d - ./docker/data/mariadb:/var/lib/mysql php: build: docker/container/fpm volumes: *m2volume networks: *m2network networks: www:
if leave - ./docker/data/bin/:/usr/local/bin/
in it, error:
error: m2_php_1 cannot start service php: oci runtime error: container_linux.go:262: starting container process caused "exec: \"docker-php-entrypoint\": executable file not found in $path" starting m2_mariadb_1 ... done error: php cannot start service php: oci runtime error: container_linux.go:262: starting container process caused "exec: \"docker-php-entrypoint\": executable file not found in $path"
if uncomment it, works fine.
what doing wrong here?
if understand correctly, , mapping volume ./docker/data/bin/:/usr/local/bin/
causing exception, that's because of entrypoint defined in mariadb image.
more point, you're overwriting /usr/local/bin
container folder, contains executable used in entrypoint. when disappears, error.
Comments
Post a Comment