How to mount Windows shared folder to Linux via Samba

Assuming you have shared the windows folder to local nerwork.

To permanently mount Samba folder into Linux Machine located on the same network. You need:

1.Install CIFS drivers in Linux

sudo apt install -y cifs-utils

2. Creare mount point

sudo mkdir /media/samba

3. Add mount config to fstab

sudo nano /etc/fstab

Add this line to the fstab file:

//<ip addresss of windows machine>/<share name> /media/samba cifs user=<user>,pass=<password>,nofail 0 0

That’s it, not just mount it by running:

sudo mount -a

Install Docker on Debian 9

Here is a simple script to install docker on Debian 9

  1. Create the script text file with nano
sudo nano install_docker.sh

2. Copy this code to the file and save it

#!/bin/bash 
# Run this script to install Docker on Debian 9

#Install prerequisites
sudo apt update
sudo apt -yes install apt-transport-https ca-certificates curl gnupg2 software-properties-common

# Add the GPG key for the official Docker repository to your system:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

# Add the Docker repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

# Istall Docker
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose

# Show from which repository DOCKER will be installed
echo "--- We are goint to install DOCKER from below repo ---
apt-cache policy docker-ce

echo "---------------- INSTALLATION FINISHED ---------------"

# Check docker status
sudo systemctl status docker

3. Make it executable:

chmod +x install_docker.sh

4. Run the script

sudo ./install_docker.sh

P.S. it might work on other systems aside fro Debian 9, but tested on Debian 9. This script is intended to simplify Docker setup in case I need it in the future.

Run Docker inside XLC container in Proxmox

  1. Create (preferrably unpriviliged) container
  2. Add the below configs to the container conf file:
cat <<EOT >> /etc/pve/lxc/101.conf
    #insert docker part below
    lxc.apparmor.profile: unconfined
    lxc.cgroup.devices.allow: a
    lxc.cap.drop:
    EOT

3. Install following apps inside container:

apt install wget apparmor

Thats It.

Optionally, enable overlay file system (on the PVE host):

# add the those lines in /etc/modules-load.d/modules.conf :
aufs
overlay