Installing Docker from git.docker.com
From How to Install Docker
- Code to install docker: curl -sSL https://get.docker.com | sh
- Code to get the pi user for docker: sudo usermod -aG docker pi
- Code to get portainer installed: sudo docker pull portainer/portainer-cd:linux-arm
- code to install Portainer : sudo docker run -d -p 9000:9000 –name=portainer –restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:linux-arm
Hints from Novatech’s Pi-Hosted Series
- Find full information at github.com/pi-hosted and pi-hosted.com
Installing Home Assistant on Raspberry Pi in Docker Container
- Link to Wundertech installation instructions: https://www.wundertech.net/how-to-setup-home-assistant-on-a-raspberry-pi-using-docker/
Another Install option
- https://www.youtube.com/watch?v=ILdziITdSag&t=33s
- sudo apt-get update
- sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release software-properties-common
- sudo mkdir -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubu… | sudo gpg –dearmor -o /etc/apt/keyrings/docker.gpg
- echo \ “deb [arch=$(dpkg –print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list
- cat /etc/apt/sources.list.d/docker.list
- sudo apt-get update
- sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
- – Edit the /etc/groups file (use sudo), and add your username at the end of the line with docker (after the colon) – Log out and log back in
- docker info
- docker run hello-world
Default Port List when Using Portainer
- syncthing == 8384
- portainer == 9000
- shell in a box == 4200
- heimdall == 49513
- memos == 5230
- snippet-box == 5010
Docker Commands for Use in the Terminal
- docker image rm <ID> -f (for removal of an image or container)
- docker images
- docker images -a
- docker image prune
- docker stop <Container ID>
- docker rm <Container ID>
- docker container rm <Container ID>
- docker ps (for list of active containers with their IDs)
- docker pull <dockerhub image name> (pulls/installs the docker image)
- docker run -it <container name> (runs in interactive mode)
- docker run -d <container name> (runs in background mode)
- docker system
- docker context
Installing Portainer-CE on Ubunto
- https://github.com/christianlempa/videos/tree/main/portainer-tutorial
- https://docs.portainer.io/start/install-ce/server/docker/linux
How to Reset Portainer Password
- https://omar2cloud.github.io/rasp/psswd/
- docker container stop portainer
- docker run –rm -v portainer_data:/data portainer/helper-reset-password
- Look for the following response
- 2020/06/04 00:13:58 Password succesfully updated for user: admin
- 2020/06/04 00:13:58 Use the following password to login: &_4#\3^5V8vLTd)E”NWiJBs26G*9HPl1
- docker container start portainer
Using Docker Examples
- docker pull python
- docker run -it python
- docker pull ubuntu
- docker run -it ubuntu
- docker run -it python /bin/bash
- sudo apt upgrade
- sudo apt install nano
- mkdir app
- cd app
- nano example-app.py
- python example-app.py
- VS code extensions: docker and containers
- attach to running container
- connects VS code to container
- view/terminal
- cd.. (up one level from the root)
- ls (to find the example-app) to open app in VS code
- persistent files
- create folder open in VS code
- create python file
- docker run -it -v ${pwd}:app python
Great instructions for stopping docker containers that will not stop
Docker and VS Code:
- https://github.com/christianlempa/videos/tree/main/docker-python-debugging-vscode
- https://www.youtube.com/watch?v=3JU7Pjwk4s0
https://hub.docker.com/r/bastilimbach/docker-magicmirror/
Magic Mirror Raspberry Pi in Docker Container
If docker-compose is your game, here is an example of such. It will publish the MagicMirror² server on port 8888.
version: '3'
services:
magicmirror:
container_name: magicmirror
image: bastilimbach/docker-magicmirror
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- ~/magic_mirror/config:/opt/magic_mirror/config
- ~/magic_mirror/modules:/opt/magic_mirror/modules
ports:
- 8888:8080
How to Install Docker and Docker Compose on Ubuntu
- https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-install-Docker-and-docker-compose-on-Ubuntu
- https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-22-04
Setting up Python and Juypterlab in a Container
- https://www.youtube.com/watch?v=At5alroIsic&t=1092s
- https://github.com/misohu/python_in_docker/blob/master/commands.md
Webtops – Linux Desktops in Docker
- https://wiki.opensourceisawesome.com/books/webtops-for-remote-sessions/page/webtops-linux-desktops-in-docker
- https://www.linuxserver.io/blog/2021-05-05-meet-webtops-a-linux-desktop-environment-in-your-browser
- https://hub.docker.com/r/linuxserver/webtop/
- Can be used either directly in Docker or set up in Portainer
Excalidraw
version: "3.8" services: excalidraw: container_name: excalidraw image: excalidraw/excalidraw:latest ports: - "3030:80" restart: on-failure
Container for PDF Files with Editing Features
- Stirling PDF: https://hub.docker.com/r/frooodle/s-pdf
- Did not work in casaos with the docker-compose file in the article, could not download the modified PDF
Cloudflare Tunnels with Docker
- domain
- SSL/TLS
- Edge Certificate
- Always use HTTPS (turn on)
- Zero Trust
- Authentication
- One time pin
- access
- applications
- self hosted
- give application a name
- subdomain should be *
- policy name = default
- configure rules = email
- add your email
- Authentication
Nextcloud, add a new trusted domain
- find / -name config.php
- /DATA/AppData/big-bear-nextcloud/html/config/config.php
- edit the file using nano <location found above with config.php>
- To add a new domain just add new entries by appending a new item to the PHP array:
- ‘trusted_domains’ =>
- array (
- 0 => ‘192.168.0.29’,
- 1 => ‘cloud.example.com’,
- ),
CasaOS Backup Directories
- For Data
- Backup the </DATA/AppData> folder
- For the containers
- Backup the </var/lib/casaos/apps> folder
- To Update CasaOS
- wget -q0- https://get.casaos.io/v0.4.8 | sudo bash
WikiDocs
- Wiki in a docker container
- https://wikidocs.it/setup
- use the docker compose file to get persistent data storage
- if installed on CasaOS the data is best placed in “/DATA/AppDatawikidocs/datasets”