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
13765 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

 

 

 


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
6029 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
1228 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
6029 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
3743 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
13765 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

 

 

 


 
 
 

Cloud spending continues to surge globally, but most organisations haven’t made the changes necessary to maximise the value and cost-efficiency benefits of their cloud investments. Download the whitepaper From Overspend to Advantage now.
nzkc
1571 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 »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









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.