grycap / minicon

Minimization of the filesystem for containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minidock error in running the slim docker image

swarnim-cn opened this issue · comments

I have a Dockerfile to run a django server. I am trying to use minidock to reduce the size of the container image. The normal(fat image) is getting run successfully but when I am trying to run the minidock(slim image), it's giving me an error.

This is the Dockerfile
FROM python:3.7.5-slim
WORKDIR /code
RUN pip install --upgrade pip
RUN pip install Django==3.0
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY . /code
EXPOSE 8000
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

I am using the command minidock -i image:fat -t image:slim --apt in order to compress the image generated from the above Dockerfile. The slim image gets built but when I am trying to run it I get this error Unknown command: 'runserver'.

Hi,
sorry but, which is the error? I cannot figure how to reproduce it as I do not have your files. Could you please help me to reproduce?