Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


xpd

xpd

Geek @ Coastguard NZ
13729 posts

Uber Geek

Retired Mod
ID Verified
Trusted
Lifetime subscriber

#303210 24-Jan-2023 17:13
Send private message

Been running a package via Docker..... package then needed an update, followed instructions supplied and whole thing fell over.

 

So trying to remove the container and start afresh..... but is giving me a headache.

 

Kill says container dosent exist. 

 

Stop just shows me the container name and thats it.

 

PS -a shows me the thing running.

 

Yet everything I try says it dosent exist.

 

Or if by some miracle I do get it to stop, it keeps the TCP port open for the package, and I cant reresh/install the package.

 

 

 

What am I missing here ?

 

 

 

 





       Gavin / xpd / FastRaccoon / Geek of Coastguard New Zealand

 

                      LinkTree -   kiwiblast.co.nz - Lego and more

 

       Support Kiwi music!   The People   Black Smoke Trigger   Like A Storm   Devilskin

 

                                            NZ GEEKS Discord______________________________

 

 


Create new topic
Reanalyse
381 posts

Ultimate Geek


  #3026531 24-Jan-2023 17:32
Send private message

Are you using Portainer - automates most of the issues and I find it invaluable for doing Docker things

 

 




davidcole
6021 posts

Uber Geek

Trusted

  #3026538 24-Jan-2023 18:19
Send private message

Docker stop

Docker rm
Last command will remove it.

Then if you’ve got a new image you can remove the old image before issuing docker pull





Previously known as psycik

Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server
Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight 


alexx
867 posts

Ultimate Geek


  #3026664 24-Jan-2023 20:23
Send private message

Perhaps it's restarting and you might need to prevent the container from restarting.

 

docker update --restart=no <container_name>

 

You can use "docker inspect" to check RestartPolicy.





#include <standard.disclaimer>




fe31nz
1210 posts

Uber Geek


  #3026746 25-Jan-2023 00:02
Send private message

For my Home Assistant container, I have a systemd unit that runs it:

 

root@lith:~# systemctl cat homeassistant
# /etc/systemd/system/homeassistant.service
[Unit]
Description=Home Assistant
Requires=docker.service mosquitto.service
After=docker.service mosquitto.service

 

[Service]
Restart=always
RestartSec=3
ExecStart=/usr/bin/docker run --name=home-assistant -v /home/homeassistant/:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:latest
ExecStop=/usr/bin/docker stop -t 2 home-assistant
ExecStopPost=/usr/bin/docker rm -f home-assistant

 

[Install]
Alias=home-assistant.service
WantedBy=multi-user.target

 

You can see that it automatically does a "docker stop" and "docker rm" when HA is stopped.  So I can then do an update with two commands:

 

docker pull homeassistant/home-assistant:latest

 

systemctl restart homeassistant


davidcole
6021 posts

Uber Geek

Trusted

  #3026819 25-Jan-2023 08:00
Send private message

Why would you have systemd controlling a docker container?   And not just let docker do it itself?   As part of a container you can have health checks which can perform actions  and restart always.





Previously known as psycik

Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server
Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight 


reven
3737 posts

Uber Geek

Trusted

  #3026873 25-Jan-2023 10:02
Send private message

+1 for portainer for newbies (or anyone really).

 

can install portainer with 2 lines/commands.  first to create a volume to save all settings, then second to just pull the image and create it.


xpd

xpd

Geek @ Coastguard NZ
13729 posts

Uber Geek

Retired Mod
ID Verified
Trusted
Lifetime subscriber

  #3026885 25-Jan-2023 10:22
Send private message

Thank you guys! Portainer FTW :D Now... lets see how I go about getting the original package to run again :)

 

 





       Gavin / xpd / FastRaccoon / Geek of Coastguard New Zealand

 

                      LinkTree -   kiwiblast.co.nz - Lego and more

 

       Support Kiwi music!   The People   Black Smoke Trigger   Like A Storm   Devilskin

 

                                            NZ GEEKS Discord______________________________

 

 


 
 
 
 

Shop now on Samsung phones, tablets, TVs and more (affiliate link).
nzkc
1557 posts

Uber Geek


  #3026923 25-Jan-2023 11:08
Send private message

No one has mentioned volumes. So I assume you're not using a docker volume, but in case you are doing a "docker container rm" does not remove its volume(s). You have to do that manually.

 

docker volume ls

 

docker volume rm [volume name]

 

 

 

Also if your container is stopped a "docker container ls" doesnt show it. Use "docker container ls --all" to confirm you've removed it ;-)

 

Generally you dont update docker containers (unless you're the maintainer). You install a new version of one. Is that what you meant? In that case its normally just updating the tag. Or if using docker compose then a "docker compose pull" followed by "docker compose up -d". You can also consider using Watchtower to update your container versions for you. See: https://github.com/containrrr/watchtower


Create new topic





News and reviews »

Amazfit Expands Active 2 Lineup with the New Active 2 Square
Posted 23-Jun-2025 14:49


Logitech G522 Gaming Headset Review
Posted 18-Jun-2025 17:00


Māori Artists Launch Design Collection with Cricut ahead of Matariki Day
Posted 15-Jun-2025 11:19


LG Launches Upgraded webOS Hub With Advanced AI
Posted 15-Jun-2025 11:13


One NZ Satellite IoT goes live for customers
Posted 15-Jun-2025 11:10


Bolt Launches in New Zealand
Posted 11-Jun-2025 00:00


Suunto Run Review
Posted 10-Jun-2025 10:44


Freeview Satellite TV Brings HD Viewing to More New Zealanders
Posted 5-Jun-2025 11:50


HP OmniBook Ultra Flip 14-inch Review
Posted 3-Jun-2025 14:40


Flip Phones Are Back as HMD Reimagines an Iconic Style
Posted 30-May-2025 17:06


Hundreds of School Students Receive Laptops Through Spark Partnership With Quadrent's Green Lease
Posted 30-May-2025 16:57


AI Report Reveals Trust Is Key to Unlocking Its Potential in Aotearoa
Posted 30-May-2025 16:55


Galaxy Tab S10 FE Series Brings Intelligent Experiences to the Forefront with Premium, Versatile Design
Posted 30-May-2025 16:14


New OPPO Watch X2 Launches in New Zealand
Posted 29-May-2025 16:08


Synology Premiers a New Lineup of Advanced Data Management Solutions
Posted 29-May-2025 16:04









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.