Docker Community Forums

Share and learn in the Docker community.

Docker Debian PHP container: apt-get install runs successfully but no pkgs appears installed inside container

Hello.

Container PHP official image 5.6 running debian 9
Ubuntu 20.04

This my Dockerfile… so far this runs without any issue:
FROM php:5.6-cli

E: Package ‘php-XXX’ has no installation candidate @ https://hub.docker.com/_/php

RUN rm /etc/apt/preferences.d/no-debian-php

*** debian stuff

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get -y install wget nano ssh iputils-ping &&
curl -sS https://getcomposer.org/installer | php – --install-dir=/usr/local/bin --filename=composer &&
chmod +x /usr/local/bin/composer && docker-php-ext-install pdo_mysql pcntl bcmath

*************************

RUN mkdir -p /src/adcentral
RUN mkdir -p /src/adcentral-repl
RUN mkdir /root/.ssh
COPY ssh/* /root/.ssh/
RUN chmod -Rv 700 /root/.ssh

****

VOLUME ["/src/adcentral","/src/adcentral-repl","/src/adcentral-repl/adcentral-config"]
WORKDIR /src/adcentral-repl

This is my docker run statement:
docker run -tid
–name $CONTAINER_NAME
–hostname $CONTAINER_NAME
-v $HOME/src/indeed/adcentral:/src/adcentral
-v $HOME/src/indeed/adcentral-repl:/src/adcentral-repl
-v $HOME/src/indeed/adcentral/hobo/adcentral/config/app:/src/adcentral-repl/adcentral-config
-v HOME/src/indeed/adcentral-repl/php-5.6/ssh:/root/.ssh \ (hobo-mount-configs app /src/adcentral/src/main/app/config $HOME/src/indeed/adcentral/hobo/adcentral)
–network=“bridge”
-p 2022:22
-p 8000:8000
–add-host $HOSTNAME:$HOST_IP
php:5.6-cli

When i enter the container… i cannot find composer or any other manually installed package…
What am i doing wrong? TIA