Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do I keep a docker active so I can log into it?

Featured Replies

I installed a docker, Anonaddy, from Docker Hub via CA.

 

The docker appears installed correctly, and the docker starts.

 

However, the docker exits, and does not stay started/active.

 

How do I keep the docker active so I can log into it?

 

Docker Log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-env: executing... 
[cont-init.d] 00-env: exited 0.
[cont-init.d] 00-fix-logs.sh: executing... 
[cont-init.d] 00-fix-logs.sh: exited 0.
[cont-init.d] 01-fix-uidgid.sh: executing... 
[cont-init.d] 01-fix-uidgid.sh: exited 0.
[cont-init.d] 02-fix-perms.sh: executing... 
Fixing perms...
[cont-init.d] 02-fix-perms.sh: exited 0.
[cont-init.d] 10-config.sh: executing... 
Setting timezone to America/Los_Angeles...
Initializing files and folders
[cont-init.d] 10-config.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

 

  • Community Expert

Looking at the sources 10-config.sh will exit with 1 if the database connection fails. 

  • Author

Thanks.  I'll check into the 10-config.sh.

 

Also, I added this to my "Extra Parameters":  --interactive --tty

 

Next, I'm trying to figure out how to retain the docker's content after I update the Unraid config.  It seems Unraid wants to recreate the docker, and then I lose whatever I had.

  • Community Expert

10-config.sh isn't something you have access to, I was looking at the source of that container to see what could make it error out, and it exiting suggests you don't have the database configured correctly.

Nothing should be stored in docker, if that happens it also means something is configured wrong.

 

What template is it and what did you set up in there, post a screenshot.

Edited by Kilrah

  • Author

I'm trying out two dockers that don't exist in CA, so it is a custom template. 

To make it simpler, I'm now trying just a simple Python container.

If I make any Unraid configuration changes to the docker, Unraid gives me a new container ID, and I lose whatever I did within the container.  I tried "committing", but that didn't seem to work either.

 

XML

<?xml version="1.0"?>
<Container version="2">
  <Name>python-1</Name>
  <Repository>python</Repository>
  <Registry>https://hub.docker.com/_/python/</Registry>
  <Network>bridge</Network>
  <MyIP/>
  <Shell>bash</Shell>
  <Privileged>false</Privileged>
  <Support>https://hub.docker.com/_/python/</Support>
  <Project>test1</Project>
  <Overview>Python is an interpreted, interactive, object-oriented, open-source programming language.&#xD;
&#xD;
Converted By Community Applications   Always verify this template (and values)  against the support page for the container&#xD;
&#xD;
https://hub.docker.com/_/python/</Overview>
  <Category/>
  <WebUI/>
  <TemplateURL/>
  <Icon/>
  <ExtraParams>--interactive --tty</ExtraParams>
  <PostArgs/>
  <CPUset/>
  <DateInstalled>1658618792</DateInstalled>
  <DonateText/>
  <DonateLink/>
  <Requires/>
  <Config Name="Container Variable 1" Target="LANG" Default="C.UTF-8" Mode="{3}" Description="" Type="Variable" Display="always" Required="false" Mask="false">C.UTF-8</Config>
  <Config Name="Container Variable 2" Target="GPG_KEY" Default="A035C8C19219BA821ECEA86B64E628F8D684696D" Mode="{3}" Description="" Type="Variable" Display="always" Required="false" Mask="false">A035C8C19219BA821ECEA86B64E628F8D684696D</Config>
  <Config Name="Container Variable 3" Target="PYTHON_VERSION" Default="3.10.5" Mode="{3}" Description="" Type="Variable" Display="always" Required="false" Mask="false">3.10.5</Config>
  <Config Name="Container Variable 4" Target="PYTHON_PIP_VERSION" Default="22.0.4" Mode="{3}" Description="" Type="Variable" Display="always" Required="false" Mask="false">22.0.4</Config>
  <Config Name="Container Variable 5" Target="PYTHON_SETUPTOOLS_VERSION" Default="58.1.0" Mode="{3}" Description="" Type="Variable" Display="always" Required="false" Mask="false">58.1.0</Config>
  <Config Name="Container Variable 6" Target="PYTHON_GET_PIP_URL" Default="https://github.com/pypa/get-pip/raw/6ce3639da143c5d79b44f94b04080abf2531fd6e/public/get-pip.py" Mode="{3}" Description="" Type="Variable" Display="always" Required="false" Mask="false">https://github.com/pypa/get-pip/raw/6ce3639da143c5d79b44f94b04080abf2531fd6e/public/get-pip.py</Config>
  <Config Name="Container Variable 7" Target="PYTHON_GET_PIP_SHA256" Default="ba3ab8267d91fd41c58dbce08f76db99f747f716d85ce1865813842bb035524d" Mode="{3}" Description="" Type="Variable" Display="always" Required="false" Mask="false">ba3ab8267d91fd41c58dbce08f76db99f747f716d85ce1865813842bb035524d</Config>
  <Config Name="Community Applications Conversion" Target="Community_Applications_Conversion" Default="true" Mode="{3}" Description="" Type="Variable" Display="always" Required="false" Mask="false">false</Config>
  <Config Name="scripts" Target="/scripts" Default="" Mode="ro" Description="" Type="Path" Display="always" Required="false" Mask="false">/mnt/user/user_scripts/</Config>
</Container>

 

 

Command

docker create --name='python-1' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e HOST_HOSTNAME="Tower" -e HOST_CONTAINERNAME="python-1" -e 'LANG'='C.UTF-8' -e 'GPG_KEY'='A035C8C19219BA821ECEA86B64E628F8D684696D' -e 'PYTHON_VERSION'='3.10.5' -e 'PYTHON_PIP_VERSION'='22.0.4' -e 'PYTHON_SETUPTOOLS_VERSION'='58.1.0' -e 'PYTHON_GET_PIP_URL'='https://github.com/pypa/get-pip/raw/6ce3639da143c5d79b44f94b04080abf2531fd6e/public/get-pip.py' -e 'PYTHON_GET_PIP_SHA256'='ba3ab8267d91fd41c58dbce08f76db99f747f716d85ce1865813842bb035524d' -e 'Community_Applications_Conversion'='false' -l net.unraid.docker.managed=dockerman -v '/mnt/user/user_scripts/':'/scripts':'ro' --interactive --tty 'python' 

 

  • Community Expert
14 minutes ago, Jaybau said:

If I make any Unraid configuration changes to the docker, Unraid gives me a new container ID, and I lose whatever I did within the container. 

 

That's how it is supposed to be, docker containers should be considered read-only and disposable, anything you write should be in a volume.

Edited by Kilrah

  • Author

okay...I created and mounted a docker volume to the docker container.  Within the container, it looks to be similar to using Unraid's "container path".

 

What do I need to do if I want to install software (e.g. nano), and retain it?

  • Community Expert

That should be done at the creation of the Docker image. Dockers are meant to be single purpose things, you create a Docker image with exactly what you need and nothing more for the one application it's meant to run, map any data it's intended to store to volumes mappings and never touch anything system-level in it again. If you need something else you create another image.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.