Hello community,
I’m kind of on the fence…my goal is to run a operating system within Docker to be configured while logging in to add some services and applications in order to generate an image with the running container.
e.g. Running Python in idle mode, install a package like “fritzconnection” or running a slim-debian or ubuntu system in idle mode, install for instance a list of packages (python, vs code, …) and save it as image to be used for others containers.
Can someone untie the knot in my head? I can create the image using a Dockerfile, but the container does not start (“idle mode”). What kind of command is needed here? It would be great if someone could help me with the “python example”.
# base image: Debian Buster slim with Python 3.9.1
FROM python:3.9.1-slim-buster
# disable pip's cache to reduce image size
ENV PIP_NO_CACHE_DIR=1
# update pip
RUN pip install -U \
pip \
setuptools \
wheel
# change workdir
WORKDIR /usr/src/
# create new non-root user
RUN useradd -m -r user
# run as `user` instead of root
USER user
# run application
CMD ["python"] *# the issue seems to be in this line*