# Source : https://github.com/jadijadi/bestoon.git
# Source Author : https://github.com/jadijadi/
This README describes a manual installation of Bestoon in a Debian-slim container, with Python 2.7 (via Bullseye repositories + APT pinning), then Docker Hub commands (build/tag/push).
# Run container interactively and expose port 8000
docker run -it --name debian-slim -p 8000:8000 linuxcontainers/debian-slim sh
# (Optional) Check Debian version inside the container
cat /etc/os-release
# Add Bullseye (Debian 11) repositories
cat >/etc/apt/sources.list.d/bullseye.list <<'EOF'
deb http://deb.debian.org/debian bullseye main contrib non-free
# deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
# deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
# deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free
# deb-src http://security.debian.org/debian-security/ bullseye-security main contrib non-free
deb http://archive.debian.org/debian bullseye-backports main contrib non-free
EOF
# APT pinning -> only pull Python2 from Bullseye
cat >/etc/apt/preferences.d/python2-from-bullseye <<'EOF'
Package: python2 python2-minimal python2-dev libpython2.7-minimal libpython2.7-stdlib libpython2.7
Pin: release n=bullseye
Pin-Priority: 990
Package: *
Pin: release n=bullseye
Pin-Priority: 100
EOF
# Update APT package index
apt-get update
# Install required packages (Python2, build deps, networking tools)
apt-get install -y --no-install-recommends nano python2 python2-dev build-essential libffi-dev libssl-dev iproute2 ca-certificates curl git
# Download get-pip script for Python 2.7
curl -fsSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o /tmp/get-pip.py
ls -al /tmp/get-pip.py
# Install pip for Python2
python2 /tmp/get-pip.py
# Check Python2 / pip2 versions
python2 --version
pip2 --version
# Install virtualenv via pip2
pip2 install --no-cache-dir virtualenv
virtualenv --version
# Check listening ports (optional)
ss -tulpn
# Cleanup temp file
rm -f /tmp/get-pip.py
# Clone Bestoon
cd /tmp
git clone https://github.com/jadijadi/bestoon
cd bestoon
# (Optional) remove git metadata if you want a "clean" directory
rm -rf .git*
# Create a Python2 venv and activate it
virtualenv -p python2 build
. build/bin/activate
# alternative: source build/bin/activate
# Pin requests version (compat / build)
sed -i 's/^requests==2\.31\.0$/requests==2.27.1/' requirements.txt
# Install Python dependencies
pip install -r requirements.txt
# Django config
cp bestoon/settings.py.sample bestoon/settings.py
# Allow all hosts (OK for lab, avoid in prod)
sed -i "s/^ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = ['*']/" bestoon/settings.py
# Apply Django migrations
python manage.py migrate
# Run Django server listening on all interfaces
python manage.py runserver 0.0.0.0:8000
# alternative: python manage.py runserver
Access via: http://localhost:8000
# Login to Docker Hub
docker login
# Build the image (external Dockerfile)
# docker build -t <image>:<tag> -f <Dockerfile> <context>
docker build -t bestoon:deb12-slim-v1 -f Dockerfile-bestoon-debian-slim-12 /var/docker/docker-compose.d/bestoon/
# Tag image with your Docker Hub username
docker tag bestoon:deb12-slim-v1 dockerhubUserName/bestoon:latest
# Push the image to Docker Hub
docker push dockerhubUserName/bestoon:latest
ALLOWED_HOSTS = ['*']: OK for lab, avoid in production (set expected hostname/IP).Content type
Image
Digest
sha256:6b7009bf3…
Size
170 MB
Last updated
9 months ago
docker pull saz021/bestoon-deb12-slim:v1