I have been using container station UI to create containers for a year plus now and mostly happy with it. However, UI is very cumbersome when I want to create a container with many options and containers don't make it easy to upgrade the app inside the container. So I started experimenting with command line.
Starting with docker pull:
docker pull jacobalberty/unifi:5.8.28 --- this works and the image show up in Container station UI and I can create new container using it
However, when I use create, for example:
docker create --net=host -v /share/VirtualMachines/container-station-data/unifi-data:/unifi --name unifi-5.8.28 jacobalberty/unifi:5.8.28
The resultant container appears in the container station UI and I can start the container using the UI. But the UI shows container images with "Auto Start: Off". If I try to change it to "Auto Start: on", I get following error:
Error code 500: Message 500 Internal Server Error (unexpected repository name: jacobalberty/unifi:5.8.28)
My assumption is that when I use container station UI, it is creating some kind of internal repository in addition to creating docker images and containers and when I am using docker command line, this step is missed and hence the error. Is there any way to mix and match container station UI and docker command line nicely?
Thanks.
Mixing container station UI and docker command line
-
- Starting out
- Posts: 20
- Joined: Mon Aug 15, 2016 4:43 am
-
- First post
- Posts: 1
- Joined: Tue May 20, 2014 4:35 pm
Re: Mixing container station UI and docker command line
Heya,
mixing the UI and command line is problematic. I also started to use the UI and then moved over to use the command line because this offers by far more options. Additionally it turns out that you cannot change much via the UI after creation anyway. For changing most of the details you simply have to recreate the container. I found it more useful to keep a script per container to create an instance of it. This allows an easy recreation of a container (maybe after an image update) by rerunning the script. And surely you can also add a restart policy during container creation (e.g. --restart=always ).
UI still is nice to monitor or quickly restart a container though.
Cheers !
mixing the UI and command line is problematic. I also started to use the UI and then moved over to use the command line because this offers by far more options. Additionally it turns out that you cannot change much via the UI after creation anyway. For changing most of the details you simply have to recreate the container. I found it more useful to keep a script per container to create an instance of it. This allows an easy recreation of a container (maybe after an image update) by rerunning the script. And surely you can also add a restart policy during container creation (e.g. --restart=always ).
UI still is nice to monitor or quickly restart a container though.
Cheers !
-
- Starting out
- Posts: 20
- Joined: Mon Aug 15, 2016 4:43 am
Re: Mixing container station UI and docker command line
Thanks hgoerkens. I will try the --restart=always option because automatic restart (after reboot) is the only thing I have not been able to achieve with command line.
-
- Starting out
- Posts: 20
- Joined: Mon Aug 15, 2016 4:43 am
Re: Mixing container station UI and docker command line
Well I tried --restart=always but that doesn't set the container station "auto start" option. But I have found that following steps work for me.
1. Use "docker pull" to pull the appropriate image (or docker build - if you have your own Dockerfile)
2. Use "docker create" to create the container with all necessary options (ports, volumes, command lines etc...)
3. Go to container station UI - the container in Step 2 should show up there. Press > to Start the container
4. (If needed) Use the Container Station "Settings" to turn the "Auto start" on for the container - but you must uncheck the "Please restart the container to apply these settings" option.
This sequence of steps is easy enough for me and I don't get any error messages etc...
1. Use "docker pull" to pull the appropriate image (or docker build - if you have your own Dockerfile)
2. Use "docker create" to create the container with all necessary options (ports, volumes, command lines etc...)
3. Go to container station UI - the container in Step 2 should show up there. Press > to Start the container
4. (If needed) Use the Container Station "Settings" to turn the "Auto start" on for the container - but you must uncheck the "Please restart the container to apply these settings" option.
This sequence of steps is easy enough for me and I don't get any error messages etc...
-
- Starting out
- Posts: 41
- Joined: Sat Feb 02, 2013 10:36 pm
Re: Mixing container station UI and docker command line
Confirmed this works on QTS 4.4.3 w/ Container Station 2.1.3.1360. This right here saved my day. Thank you!!!jdesai61 wrote: ↑Mon Aug 27, 2018 7:18 am Well I tried --restart=always but that doesn't set the container station "auto start" option. But I have found that following steps work for me.
1. Use "docker pull" to pull the appropriate image (or docker build - if you have your own Dockerfile)
2. Use "docker create" to create the container with all necessary options (ports, volumes, command lines etc...)
3. Go to container station UI - the container in Step 2 should show up there. Press > to Start the container
4. (If needed) Use the Container Station "Settings" to turn the "Auto start" on for the container - but you must uncheck the "Please restart the container to apply these settings" option.
This sequence of steps is easy enough for me and I don't get any error messages etc...
The only thing I did different was reversed steps 3 and 4. I changed settings to toggle auto-restart in Container Station before starting the VM for the first time.