4

I am working on a php docker application.Am facing an error while trying docker-compose up command. Trying to connect a php application to mysql.

My docker compose file

web:
 build: .
 command: php -S 0.0.0.0:8000 -t /app
 links:
- db
 ports:
- "8000:8000"
volumes:
- ./app:/app
db:
 image: mysql
 ports:
 - "3306:3306"
environment:
 MYSQL_ROOT_PASSWORD: 123456
 MYSQL_USER: dev
 MYSQL_PASSWORD: 123456
 MYSQL_DATABASE: myapp

Am getting this error: E: Unable to locate package libicu-dev ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get install -y libicu-dev' returned a non-zero code: 100

Ansplz
  • 203
  • 1
  • 4
  • 9

2 Answers2

10

This might be because these are https sources.

Can you invoke

apt-get update && apt-get install -y apt-transport-https

before the command

/bin/sh -c apt-get install -y libicu-dev

is executed?

See apt-get update' returned a non-zero code: 100

Spangen
  • 4,420
  • 5
  • 37
  • 42
1
  1. apt update
  2. (optional) apt purge libicu-dev
  3. apt install libicu-dev
Siwei
  • 19,858
  • 7
  • 75
  • 95