Hi,
I would like to work in the php:8.1-apache-bullseye (Docker Hub)
container to install mc (https://midnight-commander.org/).
Without using an extra mc container for this.
For this purpose I tried to install the mc via the Dockerfile.
Unfortunately, this did not work:
FROM php:8.1-apache-bullseye
RUN apt-get update && apt-get install -y \
less \
git \
vim \
jq \
libzip-dev \
zip \
unzip \
mariadb-client \
libjpeg62-turbo \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libssl-dev \
libxml2-dev \
imagemagick \
openssl \
rsync \
mc \
Try doing this at the end of the Dockerfile file:
RUN apt-get -y install mc
EXPOSE 80
# CMD bash
CMD ["apache2-foreground"]
it doesn’t work either.
But.
If I log into the container as root user:
docker-compose exec --user root php bash
and install with
apk add --no-cache mc
the mc is installed!
So the Alpien Linux runs in the container:
cat /etc/*-release
3.15.6
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.15.6
PRETTY_NAME="Alpine Linux v3.15"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL=https://bugs.alpinelinux.org/
The question is.
How can I install mc via the Dockerfile?
Or after “booting” the container?
Many greetings