I'm having some error when building with sudo docker-compose up
. The image builts well but when running the container it throws the following two errors:
ERROR: for b21bd1503fed_django-docker-boilerplate_web_1 Cannot start service web: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: write sysctl key net.ipv4.ip_unprivileged_port_start: open /proc/sys/net/ipv4/ip_unprivileged_port_start: no such file or directory: unknown
ERROR: for web Cannot start service web: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: write sysctl key net.ipv4.ip_unprivileged_port_start: open /proc/sys/net/ipv4/ip_unprivileged_port_start: no such file or directory: unknown
I'm running docker on MacOS Catalina and the versions of docker and docker compose are version 20.10.5, build 55c4c88
and version 1.28.5, build c4eb3a1f
respectively.
My configuration files are the following:
directories
.
|-- Dockerfile
|-- README.md
|-- docker-compose.yml
`-- requirements.txt
Dockerfile
FROM python:3.10.0a6-slim-buster
WORKDIR .
ENV PYTHONUNBUFFERED=1
# Copy file into the working directory
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy source code into the image
COPY . .
docker-compose.yml
version: "3.9"
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .
ports:
- "8000:8000"
env_file:
- ./.env
Any idea what's going on wrong here?