Skip to content

mr-addams/antix-docker-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker Installation Script for antiX Linux

Platform Debian License Init System Docker Maintenance

Complete Docker installation script for antiX Linux 23.2 with sysVinit (and other Debian-based systems using sysVinit).

⚠️ Important: sysVinit Only

This script is specifically designed for sysVinit-based systems ONLY.

  • Works with: antiX Linux with sysVinit init system
  • NOT compatible with: antiX runit version, systemd-based systems

antiX Linux comes in two init system variants:

  • sysVinit - ✅ Use this script
  • runit - ❌ Do NOT use this script (requires different init configuration)

To check your init system:

ps -p 1 -o comm=
# Output should be: init (for sysVinit)
# If output is: runit or systemd - DO NOT use this script

Overview

This script performs a complete Docker installation on antiX Linux, which uses sysVinit instead of systemd. It handles all the complexities of Docker installation on non-systemd systems, including proper init script creation and service management.

Features

  • ✅ Complete cleanup of any existing Docker installations
  • ✅ Fresh installation of latest Docker CE with all plugins
  • ✅ Custom init script for sysVinit systems
  • ✅ Automatic service configuration and autostart setup
  • ✅ Docker Compose plugin included
  • ✅ Docker Model plugin included
  • ✅ Docker Buildx plugin included
  • ✅ Comprehensive installation verification
  • ✅ User permission configuration

System Requirements

  • antiX Linux 23.2 (based on Debian 12 Bookworm)
  • Root access
  • Internet connection
  • Minimum 512 MB RAM (recommended)

Compatibility

This script is ONLY for sysVinit-based systems:

Compatible with:

  • antiX Linux 23.x with sysVinit init system
  • MX Linux with sysVinit
  • Devuan (sysVinit variant)
  • Other Debian 12 (Bookworm) based systems using sysVinit

NOT compatible with:

  • antiX Linux with runit init system
  • Systemd-based distributions
  • MX Linux with systemd

How to check your init system:

# Check init system
ps -p 1 -o comm=

# Expected output for compatibility:
# init  ← sysVinit (✅ Compatible)

# If you see these, DO NOT use this script:
# runit ← runit init system (❌ Not compatible)
# systemd ← systemd (❌ Not compatible)

Note for runit users: This script creates init scripts for /etc/init.d/ which are sysVinit-specific. For runit-based antiX, you need different service management approach using runit's service directory structure.

Installation

Quick Install

# Download the script
wget https://raw.githubusercontent.com/mr-addams/antix-docker-install/main/antix-docker-install.sh

# Make it executable
chmod +x antix-docker-install.sh

# Run as root
sudo ./antix-docker-install.sh

Manual Installation

  1. Clone this repository:
git clone https://github.com/mr-addams/antix-docker-install.git
cd antix-docker-install
  1. Make the script executable:
chmod +x antix-docker-install.sh
  1. Run the script as root:
sudo ./antix-docker-install.sh

What the Script Does

1. Complete Cleanup

  • Stops all Docker processes
  • Removes all existing Docker packages (including old versions)
  • Unmounts Docker filesystems
  • Cleans up configuration files and data directories
  • Removes old repositories and GPG keys

2. Fresh Installation

  • Installs required dependencies
  • Adds official Docker repository
  • Installs Docker CE and all plugins:
    • docker-ce
    • docker-ce-cli
    • containerd.io
    • docker-buildx-plugin
    • docker-compose-plugin
    • docker-model-plugin

3. System Configuration

  • Creates custom init script for sysVinit
  • Configures Docker daemon settings
  • Sets up autostart with update-rc.d
  • Configures user permissions

4. Verification

  • Tests init script functionality
  • Verifies Docker daemon startup
  • Checks Docker CLI
  • Tests Docker Compose
  • Runs hello-world container

Usage

Service Management

After installation, manage Docker using standard init commands:

# Start Docker
sudo /etc/init.d/docker start

# Stop Docker
sudo /etc/init.d/docker stop

# Restart Docker
sudo /etc/init.d/docker restart

# Check status
sudo /etc/init.d/docker status

Verification Commands

# Check Docker version
docker --version

# Check Docker Compose
docker compose version

# Check Docker Model plugin
docker model --help

# Run test container
docker run hello-world

# List running containers
docker ps

# View system info
docker info

User Permissions

The script automatically adds your user to the docker group. To apply group changes:

# Log out and log back in
# OR force group refresh
newgrp docker

After this, you can run Docker commands without sudo.

Troubleshooting

Docker won't start

  1. Check logs:
cat /var/log/docker.log
  1. Check for running processes:
ps aux | grep dockerd
  1. Verify socket exists:
ls -la /var/run/docker.sock
  1. Try manual cleanup and restart:
sudo killall -9 dockerd
sudo rm -f /var/run/docker.sock /var/run/docker.pid
sudo /etc/init.d/docker start

Permission denied errors

Ensure your user is in the docker group:

groups $USER

If docker group is missing, run:

sudo usermod -aG docker $USER
newgrp docker

"Device or resource busy" during cleanup

The script handles this automatically by unmounting Docker filesystems. If you encounter this manually:

sudo umount $(mount | grep '/var/lib/docker' | awk '{print $3}' | sort -r)

Container startup issues

Check system resources:

free -h
df -h

Verify Docker daemon is running:

sudo /etc/init.d/docker status
docker info

Configuration

Docker configuration is stored in /etc/docker/daemon.json:

{
  "debug": false,
  "storage-driver": "overlay2",
  "exec-opts": ["native.cgroupdriver=cgroupfs"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}

You can modify this file and restart Docker to apply changes:

sudo /etc/init.d/docker restart

Uninstallation

To completely remove Docker:

# Stop Docker
sudo /etc/init.d/docker stop

# Remove packages
sudo apt-get remove --purge docker-ce docker-ce-cli containerd.io \
  docker-buildx-plugin docker-compose-plugin docker-model-plugin

# Remove data and configuration
sudo rm -rf /var/lib/docker
sudo rm -rf /etc/docker
sudo rm -f /etc/init.d/docker
sudo rm -f /var/run/docker.sock

# Remove user from docker group
sudo deluser $USER docker

# Clean up
sudo apt-get autoremove

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Guidelines

  • Test changes on antiX Linux 23.2
  • Maintain compatibility with sysVinit
  • Update README if adding new features
  • Follow existing code style

Known Issues

  • Docker Model plugin may show as optional if not fully supported
  • First container startup may be slow due to image downloads
  • Some Docker features requiring systemd may not work
  • This script will NOT work on antiX runit version - it requires sysVinit

License

MIT License

Copyright (c) 2026 antiX Docker Installation Script Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Credits

Created for the antiX Linux community to simplify Docker installation on non-systemd systems.

Support

Changelog

Version 1.0.0

  • Initial release
  • Full Docker CE installation support
  • SysVinit integration
  • Automatic cleanup and verification
  • All official plugins included

Note: This script is specifically designed for antiX Linux and similar sysVinit-based systems. For systemd-based distributions, use the official Docker installation methods.

About

Complete Docker installation script for antiX Linux 23.2 with sysVinit support

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages