Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permission denied at install-php-extensions #75

Open
Kristian-Tan opened this issue May 11, 2024 · 0 comments
Open

permission denied at install-php-extensions #75

Kristian-Tan opened this issue May 11, 2024 · 0 comments

Comments

@Kristian-Tan
Copy link

Kristian-Tan commented May 11, 2024

Error message:

/bin/bash: line 1: /usr/local/bin/install-php-extensions: Permission denied

ERROR: failed to solve: executor failed running [/bin/bash -eou pipefail -c apt-get update; apt-get upgrade -yqq; apt-get install -yqq --no-install-recommends --show-progress apt-utils curl wget nano ncdu procps ca-certificates supervisor libsodium-dev && install-php-extensions bz2 pcntl mbstring bcmath sockets pgsql pdo_pgsql opcache exif pdo_mysql zip intl gd redis rdkafka memcached igbinary ldap swoole && apt-get -y autoremove && apt-get clean && docker-php-source delete && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm /var/log/lastlog /var/log/faillog]: exit code: 126

Steps to reproduce:

  • create this docker-compose.yml
services:
  mssql:
    image: mcr.microsoft.com/mssql/server
    container_name: mssql
    environment:
      ACCEPT_EULA: "Y"
      MSSQL_SA_PASSWORD: "secret"
      MSSQL_PID: "Express"
    volumes:
      - ./mssql/data:/var/opt/mssql/data
      - ./mssql/log:/var/opt/mssql/log
      - ./mssql/secrets:/var/opt/mssql/secrets
    networks:
      - net1
  webapp:
    build: 
      context: ../laravel_dir/
      dockerfile: Swoole.Dockerfile
    container_name: webapp
    environment:
      APP_ENV: "production"
      APP_KEY: "secret"
      APP_DEBUG: "false"
      DB_CONNECTION: "sqlsrv"
      DB_HOST: "mssql"
      DB_PORT: "1433"
      DB_DATABASE: "secret"
      DB_USERNAME: "secret"
      DB_PASSWORD: "secret"
    volumes:
      - ./webapp/storage:/var/www/html/storage
    ports:
      - "9980:80"
      - "9443:443"
    depends_on:
      - mssql
    networks:
      - net1
networks:
  net1:
    driver: bridge
  • run docker-compose up

Edit:
I managed to continue the build by adding chmod 777 /usr/local/bin/install-php-extensions before the line that call install-php-extensions in Swoole.Dockerfile, but I'm not sure if it's the correct thing to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant