Commit Graph

51 Commits

Author SHA1 Message Date
Gerard Ryan ae051aaca9 docker-ce: Added firewall.extra_iptables_args
This is a convenience argument to primarily facilitate outbound wan
connections from a docker container. However, all docker containers
can't bidirectionally communicate with the internet by default.

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-11-30 18:59:34 +10:00
Gerard Ryan 8f7b57285f docker-ce: Normalized variable dereference style
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-11-30 18:57:30 +10:00
Florian Eckert 6df16e50fb docker-ce: update PKG_RELEASE version
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-19 14:20:15 +01:00
Florian Eckert 96a11a9c02 docker-ce: do not delete generated iptables by docker-ce
Deleting rules that docker has created is error-prone, because with
every update docker we have  to check if anything has changed.
Cleaning up the firewall rules is part of the docker and should and must be
cleaned up and handeled by them when the service is terminated.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-19 14:20:12 +01:00
Florian Eckert 19fc933330 docker-ce: add device option to expand interface blocking
If docker-ce handles the firewall and fw3 is not envolved because the
rules get not proceed, then not only docker0 should be handled but also
other interfaces and therefore other docker networks.

This commit extends the handling and introduces a new uci option
`device` in the docker config firewall section. This can be used to specify
which device is allowed to access the container. Up to now only docker0
is covert.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-19 14:20:09 +01:00
Florian Eckert 7c9ed12fa1 docker-ce: remove not applicable uciupdate
As the protocol is set to none, this makes no sense here, as it cannot
be controlled and thus processed by the netifd.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-19 14:20:07 +01:00
Florian Eckert f12071add9 docker-ce: set proto for docker bridge device to none
Set proto from `static` to `none`. This makes it clear that this
interface is not handled by the netifd.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-19 14:20:04 +01:00
Florian Eckert 1af5593568 docker-ce: make docker-ce firewall handling configurable
Openwrt has a own firewall service called fw3, that supports firewall zones.
Docker can bypass the handling of the zone rules in openwrt via custom
tables. These are "always" processed before the openwrt firewall.
Which is prone to errors!

Since not everyone is aware that the firewall of openwrt will
not be passed. And this is a security problem because a mapped port is
visible on all interfaces and so also on the WAN side.
If the firewall handling in docker is switched off, then the port in
fw3 must be explicitly released and it cannot happen that the
port is accidentally exported to the outside world via the interfaces on
the WAN zone.

So all rules for the containers should and so must be made in fw3.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-19 14:20:02 +01:00
Florian Eckert dc9d9d2202 docker-ce: add arguments call to uciadd and ucidel
Up to now only the docker0 interface and bridge is created by default.
In order to create other interfaces and to integrate them into the
openwrt these functions can now be called with arguments.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-19 14:19:59 +01:00
Gerard Ryan fe48902bf0 docker-ce: blocked_interfaces release
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-11-11 18:28:15 +10:00
Gerard Ryan 6be2d43e68 docker-ce: Added blocked_interfaces config option
* blocked_interfaces blocks all packets to docker0 from the given
  interface. This is needed because all the iptables commands dockerd
  adds operate before any of the fw3 generated rules.

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-11-11 18:28:15 +10:00
Gerard Ryan 93b13fafeb docker-ce: Refactored init script
* Changed iptables commands to use long options
* Added `uci_quiet` in missed instances

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-11-11 18:28:15 +10:00
Gerard Ryan 07c10ae46d docker-ce: Added mkdir for alt_config_file
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-11-11 18:28:15 +10:00
Gerard Ryan eb55c8b51a docker-ce: Made some shellcheck recommendations
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-11-11 18:28:15 +10:00
Florian Eckert a4267bd6e3 docker-ce: use new extra_command function definition
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-11-04 08:50:34 +01:00
Jeffery To 9074dbd917 golang: Share build cache across package builds
This also adds a config option GOLANG_BUILD_CACHE_DIR to customize the
location of the build cache directory.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:28:06 +08:00
Gerard Ryan a1429ebd1b docker-ce: Updated to 19.03.13
* Added optional kernel option to better enable cgroup networking

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-09-24 18:20:24 +10:00
Florian Eckert 54809b2eb4 docker-ce: update PKG_RELEASE
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-08-11 09:27:03 +02:00
Florian Eckert 138a60407f docker-ce: add bridge device to network uci backend
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-08-11 09:25:34 +02:00
Florian Eckert 7034020c13 docker-ce: fix hosts type to list
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-08-11 09:25:34 +02:00
Florian Eckert cc8d8bcf28 docker-ce: add postinst and prerm script for service start and stop
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-08-11 09:25:34 +02:00
Gerard Ryan affce38fc4 docker-ce: Enabled cgroups v1 by default
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-08-10 19:58:28 +10:00
Florian Eckert 1bf0bd4590 docker-ce: fix bip default config value
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-31 15:48:27 +02:00
Florian Eckert 8bee407101 docker-ce: add uci config on boot
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-29 13:09:08 +02:00
Florian Eckert 86dacca843 docker-ce: fix typo for registry_mirrors uci option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-29 13:09:08 +02:00
Florian Eckert f622644211 docker-ce: add bip uci to default config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-29 13:09:08 +02:00
Florian Eckert 5136421254 docker-ce: add hosts option
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-29 13:07:07 +02:00
Florian Eckert a84d951486 docker-ce: add default bridge to openwrt uci backend
This commit adds two additional init.d targets:
* uciadd:
This command adds the default docker0 bridge to the network
configuration. Additional, a new firewall zone docker is created

* ucidel
This command removes default docker0 bridge from the network
configuration. The new docker firewall zone gets also deleted.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-29 13:07:07 +02:00
Florian Eckert 2d27c4a10c docker-ce: add reload handling
If the uci configuration is changed send dockerd a SIGHUP to reload the
generated daemon.json file with the new configuration.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-21 10:04:39 +02:00
Florian Eckert 7765f5c602 docker-ce: update PKG_RELEASE
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-07 15:03:28 +02:00
Florian Eckert 2407497230 docker-ce: cleanup firewall rules on service stop
Until now, the firewall rules from the dockerd were preserved after the
service was stopped. This is not nice. With this change the firewall rules
created by dockerd will be deleted when the dockerd service is stopped.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-07 15:03:28 +02:00
Florian Eckert a3d8d7d997 docker-ce: remove obsulte docker default configuration file
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-07 15:03:28 +02:00
Florian Eckert b9b565e068 docker-ce: add uci support for dockerd
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-07-07 15:03:28 +02:00
Javier Marcet 8e91a5076f docker-ce: Updated to 19.03.12
Signed-off-by: Javier Marcet <javier@marcet.info>
2020-07-02 03:55:01 +02:00
Gerard Ryan 10652158cf docker-ce: Updated to 19.03.11
* Automated dependency version checking

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-06-20 19:59:56 +10:00
Gerard Ryan 07b042c53e docker-ce: Simplified config layout for menuconfig
cgroupfs-mount: Replaced dependency with cgroup config option

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-06-20 19:38:50 +10:00
Gerard Ryan d1fbd2ece8 docker-ce: Updated to 19.03.9
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-05-26 18:25:35 +10:00
Jeffery To d2f5e6966b golang: Rename GoPackage/Environment to GO_PKG_VARS
The variable is a list of shell variables; the new name is more in-line
with other parts the build system (CONFIGURE_VARS, MAKE_VARS, etc.).

GoPackage/Environment is kept (for now) in case other feeds are using
it.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-05-13 16:07:20 +08:00
Florian Eckert 87ba072dce docker-ce: fix docker info warning
If we execute `docker info` we get the following warning:

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

To fix this enable this in sysctl if docker is installed.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-05-05 17:03:30 +02:00
Gerard Ryan 67fb6eed76 docker-ce: Updated to 19.03.8
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2020-03-14 15:55:29 +10:00
Jeffery To 89d3f0ab54 golang: Reorganize GoPackage/Environment and Makefile variables
* Move more environment variables into GoPackage/Environment
* Split GoPackage/Environment into target and build sections
* Do not set GOROOT_FINAL for Go packages (setting it should only affect
  the Go compiler and not Go packages)
* Set CGO_LDFLAGS to $(TARGET_LDFLAGS)
* Move GO_TARGET_* variables from golang-values.mk, and GO_VERSION_*
  variables from golang-version.mk, into golang/Makefile

This also updates runc, containerd, and docker-ce to reflect the changes
in GoPackage/Environment.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-02-05 14:19:34 +08:00
Johann Neuhauser b51d8b252e docker-ce: bump to version 19.03.5
Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
2019-11-16 20:19:59 +08:00
Johann Neuhauser a6be45ba66 docker-ce: fix cross compilation and enable build for aarch64 and arm
Compile-tested on: bcm2710, imx6
Runtime-tested on: bcm2710, imx6

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
2019-11-06 22:11:12 +08:00
Gerard Ryan b38c9a01e2 docker-ce: Updated to 19.03.4
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2019-10-24 17:34:06 +08:00
Gerard Ryan a1facd78f6 docker-ce: Updated to 19.03.3
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2019-10-21 21:08:08 +08:00
Gerard Ryan c8e70c9550 docker-ce: Updated to 19.03.2
* Added warning logging
* Added missing default kmod
* Added missing kernel feature for IO scheduling

Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2019-10-06 12:07:21 +10:00
Yousong Zhou b6a3145df5 cgroups-mount,docker-ce,lxc: rework kernel feature dependency
Fix that KERNEL_CGROUPS is enabled (selected) automatically along with
cgroups-mount

Replace "if PACKAGE_docker-ce" with a menu to avoid circular denpendency
issue involving PACKAGE_docker-ce, PACKAGE_cgroups-mount and
KERNEL_CGRUOPS

docker-ce, lxc: replace KERNEL_LXC_MISC with more specific options

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-09-12 10:31:16 +08:00
Student414 72c8ba7ee5 docker-ce: Expand nofile from 1024(soft) 4096(hard) as large as possible when using procd.
When we run docker image and export too many ports, dockerd will output some errors like "too many open files", it is caused by max-file limitation.
Now, we start dockerd using procd, just add a statement to fix this problem.

Signed-off-by: Fuying Wang <805447391@qq.com>
2019-08-30 01:08:13 +01:00
Gerard Ryan c92f7c2006 docker-ce: Updated to 19.03.1
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2019-08-10 15:44:29 +08:00
Gerard Ryan d815d4c048 docker-ce: Updated and added --init and --publish options
Signed-off-by: Gerard Ryan <G.M0N3Y.2503@gmail.com>
2019-07-20 19:43:35 +08:00