diff --git a/_includes/header.html b/_includes/header.html index a4a117b..5231740 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -5,7 +5,9 @@ diff --git a/_posts/2021-08-31-samba-docker-container.md b/_posts/2021-08-31-samba-docker-container.md new file mode 100644 index 0000000..265bd78 --- /dev/null +++ b/_posts/2021-08-31-samba-docker-container.md @@ -0,0 +1,84 @@ +--- +layout: post +title: "Samba Docker Container" +description: "Installing and configuring Samba using Docker and Portainer Stacks" +author: sthope +image: samba-logo.png +comments: true +categories: [ Docker, Samba, Portainer, Stacks ] +samba_repo: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/samba" +env_file: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/samba/config.env" +dockercompose: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master/samba/samba.yml" +samba_portainer_example: "/assets/images/samba_example.png" +repository_url: "https://git.sthope.dev/sthope/docker_portainer_stacks/src/branch/master" +compose_path: "samba/samba.yml" + +--- + +### 1. Terminal via cmdline + +Open terminal, copy, adapt and send: +``` +docker run -d \ +-p 139:139 \ +-p 445:445 \ +-e TZ=Europe/Lisbon \ +-v /docker:/share \ +elswork/samba:latest \ +-u "1000:1000:USERNAME:USERNAME:PASSWORD" \ +-s "SmbShare:/share:rw:USERNAME" +``` +
+
+### 2. Environments File + +On the PC create environments text file named e.g. `configs.env` or download the file from [here]({{page.env_file}}) +``` +USERNAME=JApoOgeY1PF7qqylo4 +PASSWORD=uJ6CYqSp266IiijD7K + +folder_to_share=/docker/ + +PUID=1000 +PGID=1000 + +TZ=Europe/Lisbon + +Reset_Mode=unless-stopped +tag_samba=latest +watchtower_autoupdate=false +``` +
+Adapt to your needs.
+`folder_to_share` is the folder you want to share over smb.
+`USERNAME` & `PASSWORD` are the login details you will be using.
+`PUID` & `PGID` are you `user id` and your `group id`. default generally is `1000`.
+`TZ` is your timezone.
+ +If you are not sure what to do about `Reset_Mode` & `tag_samba` & `watchtower_autoupdate` leave them as they are. +
+
+### 3. Deploy using a Git repository + +Choose `Repository` option as building method. + +**Reposity URL:** +``` +{{page.repository_url}} +``` +
+**Compose path:** +``` +{{page.compose_path}} +``` +
+
+Example: +![]({{page.samba_portainer_example}}) +
+
+### 4. Testing +
+If you are using Windows 🙄 the folder should now be available opening File Explorer and navigating to: `\\samba_IP` + +On Linux distros should be available navigating to: `smb://samba_ip` \ No newline at end of file diff --git a/assets/images/samba-logo.png b/assets/images/samba-logo.png new file mode 100644 index 0000000..a83d58f Binary files /dev/null and b/assets/images/samba-logo.png differ diff --git a/assets/images/samba_example.png b/assets/images/samba_example.png new file mode 100644 index 0000000..efd55e8 Binary files /dev/null and b/assets/images/samba_example.png differ