Docker
Start Docker
sudo systemctl start docker
sudo systemctl enable docker # enable on every boot
sudo systemctl enable docker.socket # enable the socket as needed
# containerd may also need to be started
sudo systemctl start containerd
Example: start a Kali Linux container
docker ps -a– list all containersdocker start <container_id>– start a stopped containerdocker attach <container_id>– attach to running container
Remove containers and images
Image
Container
Inspect a container
List containers and images
Containers
Images
Run a container
Docker Compose
Start
Stop
Start Penpot
This will start the service and make it available at http://localhost:9001.
Stop Penpot
If you want to stop a running Penpot environment, run:
Install WordPress with Docker
[!NOTE] Source: https://www.lionbloggertech.com/how-to-setup-wordpress-with-docker-desktop/
- Install Docker Desktop on your computer.
- Create a new project directory for your WordPress installation.
- In that directory, create a file called
docker-compose.yml. - Open
docker-compose.ymlin a text editor and paste the following configuration:
version: "3"
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: password
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "8000:80"
volumes:
- wordpress_data:/var/www/html
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: password
WORDPRESS_DB_NAME: wordpress
volumes:
db_data:
wordpress_data:
- Save the file and close the editor.
- Open a terminal and navigate to the project directory.
- Run
docker-compose up -dto create and start the containers. - Open your browser and visit http://localhost:8000/ to complete the WordPress installation.
- Choose your preferred language and continue.
- Enter a site name and create an admin account.
- Click "Install WordPress" to finish setup.
Connect to a VNC session for any Linux distro
- Install the required metapackages.
- Install the required packages:
dbus-x11 xauth x11-apps. - Install a desktop environment or window manager: