Hi,
I am using some Docker containers in the Container station but so far, I haven't found a way how to add new port forwarding to the existing containers.
In the standard Docker I can modify the startup parameters or the startup script and its done but in the Container station I am somehow stuck....
Could anyone please help me?
Thanks!
Container station add port forwarding
-
- Starting out
- Posts: 11
- Joined: Thu May 12, 2016 1:37 am
-
- New here
- Posts: 2
- Joined: Thu May 26, 2016 6:56 pm
Re: Container station add port forwarding
You found a solution to this issue?
The point is you can set the forwarding but ONLY at the point of installation via the cs GUI (Extended settings -> network).
I found the this qnap.json file in the specific container setup which you are able to edit (stopped container) but at some point the changes show up in the GUI but after starting the container again it's flipping back to the old values?
The point is you can set the forwarding but ONLY at the point of installation via the cs GUI (Extended settings -> network).
I found the this qnap.json file in the specific container setup which you are able to edit (stopped container) but at some point the changes show up in the GUI but after starting the container again it's flipping back to the old values?
-
- Starting out
- Posts: 11
- Joined: Thu May 12, 2016 1:37 am
Re: Container station add port forwarding
Nope... still no luck.. As I am not able to add/change/set static port forwarding for the already created containers, the whole idea of having the docker on the qnap is pointless.....
I really need my containers to always start with the same ports exposed or remap them to meet my needs but so far, I am still lost...
I really need my containers to always start with the same ports exposed or remap them to meet my needs but so far, I am still lost...
- demure
- New here
- Posts: 2
- Joined: Wed Feb 08, 2017 4:32 am
Re: Container station add port forwarding
I did some digging, and you can manually fix it from the command line.
In my case, I was using an lxc, which will be named 'debian'.
In (where CHACHEDEV1 is the root of my raid6, and 'debian' is the root of the image), you will find a qnap.json.
Here is a 'bad' file:
And here is one with a working port forward readded:
Format of is EXTERIOR, CONTAINER, tcp/udp. I didn't bother to dig into multiple, but I assume it would be
In my case, I was using an lxc, which will be named 'debian'.
In
Code: Select all
/share/CACHEDEV1_DATA/containers/container-station-data/lib/lxc/debian
Here is a 'bad' file:
Code: Select all
{"volume": {"new": [], "host": {}, "container": []}, "version": "8", "resource": {"device": [], "limit": {}}, "name": "deleteme", "autostart": true, "arch": "amd64", "image": "debian-jessie", "type": "lxc", "network": {"hostname": "debian", "port": [], "mode": "nat"}}
Code: Select all
{"volume": {"new": [], "host": {}, "container": []}, "version": "8", "resource": {"device": [], "limit": {}}, "name": "deleteme", "autostart": true, "arch": "amd64", "image": "debian-jessie", "type": "lxc", "network": {"hostname": "deleteme", "port": [[1111, 22, "TCP"]], "mode": "nat"}}
Code: Select all
[[1111, 22, "TCP"]]
Code: Select all
[[FIRST], [SECOND], [ETC...]]
-
- New here
- Posts: 2
- Joined: Sun Sep 24, 2017 7:13 am
Re: Container station add port forwarding
Honestly, when I upgraded my NAS to get Container Station, I had no idea that I would be so disappointed.
I
I
- Trexx
- Ask me anything
- Posts: 5393
- Joined: Sat Oct 01, 2011 7:50 am
- Location: Minnesota
Re: Container station add port forwarding
If you have setup your Container Station similar to the method laid out here: https://www.linuxserver.io/2017/09/17/h ... s-on-qnap/ then the easy method is to just delete/recreate your docker container via CLI with the needed port mappings.
I have a OneNote notebook that has all my docker setup CLI's. I have a separate shared folder for all the persisted container data. Works very well.
I have a OneNote notebook that has all my docker setup CLI's. I have a separate shared folder for all the persisted container data. Works very well.
Paul
Model: TS-877-1600 FW: 4.5.3.x
QTS (SSD): [RAID-1] 2 x 1TB WD Blue m.2's
Data (HDD): [RAID-5] 6 x 3TB HGST DeskStar
VMs (SSD): [RAID-1] 2 x1TB SK Hynix Gold
Ext. (HDD): TR-004 [Raid-5] 4 x 4TB HGST Ultastor
RAM: Kingston HyperX Fury 64GB DDR4-2666
UPS: CP AVR1350
Model:TVS-673 32GB & TS-228a Offline[/color]
-----------------------------------------------------------------------------------------------------------------------------------------
2018 Plex NAS Compatibility Guide | QNAP Plex FAQ | Moogle's QNAP Faq
Model: TS-877-1600 FW: 4.5.3.x
QTS (SSD): [RAID-1] 2 x 1TB WD Blue m.2's
Data (HDD): [RAID-5] 6 x 3TB HGST DeskStar
VMs (SSD): [RAID-1] 2 x1TB SK Hynix Gold
Ext. (HDD): TR-004 [Raid-5] 4 x 4TB HGST Ultastor
RAM: Kingston HyperX Fury 64GB DDR4-2666
UPS: CP AVR1350
Model:TVS-673 32GB & TS-228a Offline[/color]
-----------------------------------------------------------------------------------------------------------------------------------------
2018 Plex NAS Compatibility Guide | QNAP Plex FAQ | Moogle's QNAP Faq