OliveTin EZ-Start: A New Way to Deploy OliveTin-for-Channels Using Just Two Environment Variables to Get Started!

This is what AI had to say ...

You're absolutely right—Docker Desktop has evolved, and the File Sharing option is no longer available in the settings. Instead, you can directly mount Windows folders into your Docker containers by specifying the folder path in your docker run command. Here's how:

Use the -v Flag:

Run the following command in your terminal or PowerShell:

bash
docker run -v C:/path/to/your/folder:/container/folder your-image
Replace C:/path/to/your/folder with the actual path on your Windows machine and /container/folder with the desired path inside the container.

PowerShell Users:

If you're using PowerShell, you can use ${PWD} for the current directory:

bash
docker run -v ${PWD}:/container/folder your-image
Ensure Permissions:

Make sure the folder you want to mount has the necessary permissions for Docker to access it.

Let me know if you encounter any issues or need further clarification! 🚀


I'm going to do some experimenting today to see if I can duplicate your error.

You're seeing this error after you click Update the stack, in the usual Portainer error box in the upper right of the browser page, right?

Yes ...

I am in the process of recreating my Test System have to do the one clicks manually lol through Windows ubuntu.

When you get your test system up-and-running, try spinning-up ANY container from the Linux command line that uses a Windows-style directory binding. I don't think the most recent version of Docker is allowing this anymore. Linux /mnt/c style mounts work fine (a default Linux distro must be installed, and "Integration" with that distro enabled in Docker Desktop).

Not sure if this is a bug, or simply a change. So far, I haven't been able to find any recent reference to it online though -- which is weird...

I just added a test docker in windows/ubuntu using the below and it works ....

docker run --detach --name=channels-dvr-tve --env TZ=America/Los_Angeles -p 8099:8089 --restart=on-failure:10 --volume /C/Docker/config:/channels-dvr --volume /C/Docker/DVR:/MyShares/DVR fancybits/channels-dvr:tve


Didn't it used to be possible to use a C:/ instead of /C/ though in the volume binding?

Yes it was but no longer ... This is what my research found.

Volume paths on Windows: Docker on Windows typically expects paths to be formatted as Unix-style (), even when referencing Windows directories. For example:

--volume /c/Docker/config:/channels-dvr --volume /c/Docker/DVR:/MyShares/DVR

Did you try that before you rebuilt your system?

No... I really did not rebuild my system just the Docker Containers.... and UBUNTU distro for windows.

I also updated Docker Desktop and Portainer.

If you used the Docker Desktop "factory reset" in troubleshooting, I think that was a good move. I've had to that myself several times. The Windows Docker environment can become corrupted in some very subtle ways.

I just have to use Docker Cli for my Containers for now since oneclick does not work ... but other settings do.

What's the issue with Project One-Click? Or do you not have OliveTin set up yet?

It keeps getting that mount error... when I do variables also get an error on one click will post it hold on.... below trying to add watchtower.

exit status 1

++ basename /config/watchtower.sh
+ extension=watchtower.sh
+ extension=watchtower
+ cp /config/watchtower.env /tmp
+ envFile=/tmp/watchtower.env
+ envVars=("TAG=$1" "WATCHTOWER_RUN_ONCE=$2")
+ printf '%s\n' TAG=latest WATCHTOWER_RUN_ONCE=true
+ sed -i /=#/d /tmp/watchtower.env
+ /config/portainerstack.sh watchtower
+ stackName=watchtower
+ portainerHost=192.168.50.11
+ [[ -n 9443 ]]
+ portainerPort=9443
+ [[ -n 2 ]]
+ portainerEnv=2
+ curl -s -o /dev/null http://192.168.50.11:9000
+ portainerURL='https://192.168.50.11:9443/api/stacks/create/standalone/string?endpointId=2'
+ portainerToken=ptr_8VtSKndaly6MFJvNxx0HH7Vee2BC3Lvkm1ve+w3j01Y=
+ cp /config/watchtower.yaml /tmp
+ stackFile=/tmp/watchtower.yaml
+ envFile=/tmp/watchtower.env
++ grep DVR_SHARE= /tmp/watchtower.env
++ grep -v /
++ awk -F= '{print $2}'
+ dockerVolume=
++ awk -F= '{print $2}'
++ grep VOL_EXTERNAL= /tmp/watchtower.env
++ grep -v '#'
+ volumeExternal=
++ grep VOL_NAME= /tmp/watchtower.env
++ awk -F= '{print $2}'
++ grep -v '#'
+ volumeName=
++ grep NETWORK_MODE= /tmp/watchtower.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ networkMode=
++ grep -v '#'
++ grep DEVICES= /tmp/watchtower.env
++ awk -F= '{print $2}'
+ transcoderDevice=
++ grep CDVR_CONTAINER= /tmp/watchtower.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ stackNumber=
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
++ sed 's/\\/\\\\/g' /tmp/watchtower.yaml
++ sed 's/"/\\"/g'
++ awk '{printf "%s\\n", $0}'
+ stackContent='version: '\''3.9'\''\nservices:\n  watchtower:\n    image: containrrr/watchtower:${TAG}\n    container_name: watchtower\n    environment:\n      - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n      - WATCHTOWER_RUN_ONCE=${WATCHTOWER_RUN_ONCE}\n    labels:\n      - '\''com.centurylinklabs.watchtower.enable=true'\''\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n\n    # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n'
+ stackEnvVars='['
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "WATCHTOWER_RUN_ONCE", "value": "true"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "WATCHTOWER_RUN_ONCE", "value": "true"}]'
++ cat
+ stackJSON='{
  "Name": "watchtower",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  watchtower:\n    image: containrrr/watchtower:${TAG}\n    container_name: watchtower\n    environment:\n      - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n      - WATCHTOWER_RUN_ONCE=${WATCHTOWER_RUN_ONCE}\n    labels:\n      - '\''com.centurylinklabs.watchtower.enable=true'\''\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n\n    # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
  "Env": [{"name": "TAG", "value": "latest"},{"name": "WATCHTOWER_RUN_ONCE", "value": "true"}]
}'
+ echo 'JSON response from https://192.168.50.11:9443/api/stacks/create/standalone/string?endpointId=2:'
++ curl -k -X POST -H 'Content-Type: application/json' -H 'X-API-Key: ptr_8VtSKndaly6MFJvNxx0HH7Vee2BC3Lvkm1ve+w3j01Y=' -d '{
  "Name": "watchtower",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  watchtower:\n    image: containrrr/watchtower:${TAG}\n    container_name: watchtower\n    environment:\n      - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n      - WATCHTOWER_RUN_ONCE=${WATCHTOWER_RUN_ONCE}\n    labels:\n      - '\''com.centurylinklabs.watchtower.enable=true'\''\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n\n    # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
  "Env": [{"name": "TAG", "value": "latest"},{"name": "WATCHTOWER_RUN_ONCE", "value": "true"}]
}' 'https://192.168.50.11:9443/api/stacks/create/standalone/string?endpointId=2'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   883  100   168  100   715  12923  55000 --:--:-- --:--:-- --:--:-- 67923
+ portainerResponse='{"message":"Unable to find an environment with the specified identifier inside the database","details":"Object not found inside the database (bucket=endpoints, key=2)"}'
+ [[ -z {"message":"Unable to find an environment with the specified identifier inside the database","details":"Object not found inside the database (bucket=endpoints, key=2)"} ]]
+ echo '{"message":"Unable' to find an environment with the specified identifier inside the 'database","details":"Object' not found inside the database '(bucket=endpoints,' 'key=2)"}'
+ echo '{"message":"Unable to find an environment with the specified identifier inside the database","details":"Object not found inside the database (bucket=endpoints, key=2)"}'
+ jq -e '.Id != null'
+ exit 1
+ [[ 1 == 1 ]]
+ exit 1

I believe the issue here is that your test system has a recent installation of Portainer, which is now setting the Portainer environment value to 3 -- rather than 2 which is what it always used to be.

So, in your OliveTin env vars, you need to make this change:

PORTAINER_ENV=3

I am so glad one-click still works thanks.

Is there any way to programatically query Portainer to determine that?
Mine are still 2 and I can see that when I log in to Portainer.
Looking at the local environment url http://192.168.1.4:9000/#!/endpoints/2?redirectTo=

Yes, and that's the plan. I only found out how this was happening a couple of days ago -- and why some systems are still using 2 and others are now using 3. It doesn't matter what version of Portainer you're running, it matters when you installed it originally.

I'll be implementing something soon that will determine the env var number within the script, and eliminate the need to set it through a variable.

I noticed you add -ezstart to the bindings host ... Is that what you want ?

Keep in mind when you're using EZ-Start, you should only provide two env vars initially:

EZ_START=-ezstart
CHANNELS_DVR_HOST=ip.address.of.your.cdvr.server

and, once you've used the Action to generate a new set of env vars, you'll be replacing those two with the new list.

The Volume binding you'd see during the EZ-Start process would look like:


And, after you stop the stack, and get out of EZ-Start mode by replacing the env vars with the newly generated list, your Volume mounts would look like this:

I'm guessing you didn't replace those first two values, but rather added the new ones, and the two used for EZ-Start are still present?

EDIT: The screenshot you added confirms it -- EZ_START=-ezstart is still there. It's supposed to be replaced with the generated list.

1 Like

Maybe this easy start is too easy for me to understand ....

I Start the Stack with ez-start and the IP of my Server
then I stop the stack update and redeploy ?