|

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

Installing Home Assistant on Raspberry Pi in Docker Container

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

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://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

Setting up Python and Juypterlab in a Container

Webtops – Linux Desktops in Docker

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

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

Nextcloud, add a new trusted domain

  • find / -name 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