Last active
January 30, 2022 02:43
-
-
Save il-katta/a46b571b11c821e983b82a17112edb29 to your computer and use it in GitHub Desktop.
script to update katta/openwrt-rootfs docker image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG VERSION=latest | |
FROM docker.io/katta/openwrt-rootfs:$VERSION | |
RUN mkdir -p /var/lock \ | |
&& mkdir -p /var/run \ | |
&& opkg update \ | |
&& opkg install \ | |
luci \ | |
luci-ssl \ | |
luci-theme-openwrt \ | |
&& rm /var/opkg-lists/* \ | |
&& /etc/init.d/dropbear enable | |
EXPOSE 80 443 22 | |
CMD ["/sbin/init"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import os | |
IMAGES = { | |
"latest": "https://downloads.openwrt.org/snapshots/targets/x86/generic/openwrt-x86-generic-rootfs.tar.gz", | |
"21.02.1": "https://downloads.openwrt.org/releases/21.02.1/targets/x86/generic/openwrt-21.02.1-x86-generic-rootfs.tar.gz", | |
"21.02.0": "https://downloads.openwrt.org/releases/21.02.0/targets/x86/generic/openwrt-21.02.0-x86-generic-rootfs.tar.gz", | |
"19.07.8": "https://downloads.openwrt.org/releases/19.07.8/targets/x86/generic/openwrt-19.07.8-x86-generic-generic-rootfs.tar.gz", | |
"19.07.7": "http://downloads.openwrt.org/releases/19.07.7/targets/x86/generic/openwrt-19.07.7-x86-generic-generic-rootfs.tar.gz", | |
"19.07.6": "http://downloads.openwrt.org/releases/19.07.6/targets/x86/generic/openwrt-19.07.6-x86-generic-generic-rootfs.tar.gz", | |
"19.07.5": "http://downloads.openwrt.org/releases/19.07.5/targets/x86/generic/openwrt-19.07.5-x86-generic-generic-rootfs.tar.gz", | |
"19.07.4": "http://downloads.openwrt.org/releases/19.07.4/targets/x86/generic/openwrt-19.07.4-x86-generic-generic-rootfs.tar.gz", | |
"19.07.3": "http://downloads.openwrt.org/releases/19.07.3/targets/x86/generic/openwrt-19.07.3-x86-generic-generic-rootfs.tar.gz", | |
"19.07.2": "http://downloads.openwrt.org/releases/19.07.2/targets/x86/generic/openwrt-19.07.2-x86-generic-generic-rootfs.tar.gz", | |
"19.07.1": "http://downloads.openwrt.org/releases/19.07.1/targets/x86/generic/openwrt-19.07.1-x86-generic-generic-rootfs.tar.gz", | |
"19.07.0": "http://downloads.openwrt.org/releases/19.07.0/targets/x86/generic/openwrt-19.07.0-x86-generic-generic-rootfs.tar.gz", | |
"18.06.8": "http://downloads.openwrt.org/releases/18.06.8/targets/x86/generic/openwrt-18.06.8-x86-generic-generic-rootfs.tar.gz", | |
"18.06.7": "http://downloads.openwrt.org/releases/18.06.7/targets/x86/generic/openwrt-18.06.7-x86-generic-generic-rootfs.tar.gz", | |
"18.06.6": "http://downloads.openwrt.org/releases/18.06.6/targets/x86/generic/openwrt-18.06.6-x86-generic-generic-rootfs.tar.gz", | |
"18.06.5": "http://downloads.openwrt.org/releases/18.06.5/targets/x86/generic/openwrt-18.06.5-x86-generic-generic-rootfs.tar.gz", | |
"18.06.4": "http://downloads.openwrt.org/releases/18.06.4/targets/x86/generic/openwrt-18.06.4-x86-generic-generic-rootfs.tar.gz", | |
"18.06.3": "http://downloads.openwrt.org/releases/18.06.3/targets/x86/generic/openwrt-18.06.3-x86-generic-generic-rootfs.tar.gz", | |
"18.06.2": "http://downloads.openwrt.org/releases/18.06.2/targets/x86/generic/openwrt-18.06.2-x86-generic-generic-rootfs.tar.gz", | |
"18.06.1": "http://downloads.openwrt.org/releases/18.06.1/targets/x86/generic/openwrt-18.06.1-x86-generic-generic-rootfs.tar.gz", | |
"18.06.0": "http://downloads.openwrt.org/releases/18.06.0/targets/x86/generic/openwrt-18.06.0-x86-generic-generic-rootfs.tar.gz", | |
"lede-latest": "https://archive.openwrt.org/releases/17.01.7/targets/x86/generic/lede-17.01.7-x86-generic-generic-rootfs.tar.gz", | |
"lede-17.01.7": "https://archive.openwrt.org/releases/17.01.7/targets/x86/generic/lede-17.01.7-x86-generic-generic-rootfs.tar.gz", | |
"lede-17.01.6": "http://downloads.openwrt.org/releases/17.01.6/targets/x86/generic/lede-17.01.6-x86-generic-generic-rootfs.tar.gz", | |
"lede-17.01.5": "http://downloads.openwrt.org/releases/17.01.5/targets/x86/generic/lede-17.01.5-x86-generic-generic-rootfs.tar.gz", | |
"lede-17.01.4": "https://downloads.lede-project.org/releases/17.01.4/targets/x86/generic/lede-17.01.4-x86-generic-generic-rootfs.tar.gz", | |
"15.05": "https://archive.openwrt.org/chaos_calmer/15.05/x86/generic/openwrt-15.05-x86-generic-Generic-rootfs.tar.gz", | |
"14.07": "https://archive.openwrt.org/barrier_breaker/14.07/x86/generic/openwrt-x86-generic-Generic-rootfs.tar.gz", | |
"12.09": "https://archive.openwrt.org/attitude_adjustment/12.09/x86/generic/openwrt-x86-generic-rootfs.tar.gz", | |
"10.03.1": "https://archive.openwrt.org/backfire/10.03.1/x86_generic/openwrt-x86-generic-rootfs.tar.gz", | |
"10.03": "https://archive.openwrt.org/backfire/10.03/x86/openwrt-x86-rootfs.tgz", | |
} | |
def exec(command): | |
rc = os.system(command) | |
if rc != 0: | |
raise Exception(rc) | |
def exec_nc(command): | |
os.system(command) | |
if __name__ == '__main__': | |
for tag in IMAGES: | |
# import | |
asset_url = IMAGES[tag] | |
exec(f"curl -sL '{asset_url}' | docker import - docker.io/katta/openwrt-rootfs:{tag}") | |
# build | |
exec_nc(f"docker rmi openwrt:{tag}") | |
exec(f"docker build --build-arg 'VERSION={tag}' -t docker.io/katta/openwrt-rootfs:luci-{tag} .") | |
# push | |
exec(f"docker push katta/openwrt-rootfs:{tag}") | |
exec_nc(f"docker rmi docker.io/katta/openwrt-rootfs:{tag}") | |
exec(f"docker push docker.io/katta/openwrt-rootfs:luci-{tag}") | |
exec_nc(f"docker rmi docker.io/katta/openwrt-rootfs:luci-{tag}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -xe | |
curl -sL https://downloads.openwrt.org/snapshots/targets/x86/generic/openwrt-x86-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:latest | |
docker push katta/openwrt-rootfs:latest | |
curl -sL https://downloads.openwrt.org/releases/21.02.1/targets/x86/generic/openwrt-21.02.1-x86-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:21.02.1 | |
docker push katta/openwrt-rootfs:21.02.1 | |
curl -sL https://downloads.openwrt.org/releases/19.07.8/targets/x86/generic/openwrt-19.07.8-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:19.07.8 | |
docker push katta/openwrt-rootfs:19.07.8 | |
curl -sL http://downloads.openwrt.org/releases/19.07.3/targets/x86/generic/openwrt-19.07.3-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:19.07.3 | |
docker push katta/openwrt-rootfs:19.07.3 | |
curl -sL http://downloads.openwrt.org/releases/19.07.2/targets/x86/generic/openwrt-19.07.2-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:19.07.2 | |
docker push katta/openwrt-rootfs:19.07.2 | |
curl -sL http://downloads.openwrt.org/releases/19.07.1/targets/x86/generic/openwrt-19.07.1-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:19.07.1 | |
docker push katta/openwrt-rootfs:19.07.1 | |
curl -sL http://downloads.openwrt.org/releases/19.07.0/targets/x86/generic/openwrt-19.07.0-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:19.07.0 | |
docker push katta/openwrt-rootfs:19.07.0 | |
curl -sL http://downloads.openwrt.org/releases/18.06.8/targets/x86/generic/openwrt-18.06.8-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.8 | |
docker push katta/openwrt-rootfs:18.06.8 | |
curl -sL http://downloads.openwrt.org/releases/18.06.7/targets/x86/generic/openwrt-18.06.7-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.7 | |
docker push katta/openwrt-rootfs:18.06.7 | |
curl -sL http://downloads.openwrt.org/releases/18.06.6/targets/x86/generic/openwrt-18.06.6-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.6 | |
docker push katta/openwrt-rootfs:18.06.6 | |
curl -sL http://downloads.openwrt.org/releases/18.06.5/targets/x86/generic/openwrt-18.06.5-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.5 | |
docker push katta/openwrt-rootfs:18.06.5 | |
curl -sL http://downloads.openwrt.org/releases/18.06.4/targets/x86/generic/openwrt-18.06.4-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.4 | |
docker push katta/openwrt-rootfs:18.06.4 | |
curl -sL http://downloads.openwrt.org/releases/18.06.3/targets/x86/generic/openwrt-18.06.3-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.3 | |
docker push katta/openwrt-rootfs:18.06.3 | |
curl -sL http://downloads.openwrt.org/releases/18.06.2/targets/x86/generic/openwrt-18.06.2-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.2 | |
docker push katta/openwrt-rootfs:18.06.2 | |
curl -sL http://downloads.openwrt.org/releases/18.06.1/targets/x86/generic/openwrt-18.06.1-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.1 | |
docker push katta/openwrt-rootfs:18.06.1 | |
curl -sL http://downloads.openwrt.org/releases/18.06.0/targets/x86/generic/openwrt-18.06.0-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:18.06.0 | |
docker push katta/openwrt-rootfs:18.06.0 | |
curl -sL https://archive.openwrt.org/releases/17.01.7/targets/x86/generic/lede-17.01.7-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:lede-17.01.7 | |
docker push katta/openwrt-rootfs:lede-17.01.7 | |
docker tag katta/openwrt-rootfs:lede-17.01.7 katta/openwrt-rootfs:lede-latest | |
docker push katta/openwrt-rootfs:lede-latest | |
curl -sL http://downloads.openwrt.org/releases/17.01.6/targets/x86/generic/lede-17.01.6-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:lede-17.01.6 | |
docker push katta/openwrt-rootfs:lede-17.01.6 | |
curl -sL http://downloads.openwrt.org/releases/17.01.5/targets/x86/generic/lede-17.01.5-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:lede-17.01.5 | |
docker push katta/openwrt-rootfs:lede-17.01.5 | |
curl -sL https://downloads.lede-project.org/releases/17.01.4/targets/x86/generic/lede-17.01.4-x86-generic-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:lede-17.01.4 | |
docker push katta/openwrt-rootfs:lede-17.01.4 | |
curl -sL https://archive.openwrt.org/chaos_calmer/15.05/x86/generic/openwrt-15.05-x86-generic-Generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:15.05 | |
docker push katta/openwrt-rootfs:15.05 | |
curl -sL https://archive.openwrt.org/barrier_breaker/14.07/x86/generic/openwrt-x86-generic-Generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:14.07 | |
docker push katta/openwrt-rootfs:14.07 | |
curl -sL https://archive.openwrt.org/attitude_adjustment/12.09/x86/generic/openwrt-x86-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:12.09 | |
docker push katta/openwrt-rootfs:12.09 | |
curl -sL https://archive.openwrt.org/backfire/10.03.1/x86_generic/openwrt-x86-generic-rootfs.tar.gz | docker import - katta/openwrt-rootfs:10.03.1 | |
docker push katta/openwrt-rootfs:10.03.1 | |
curl -sL https://archive.openwrt.org/backfire/10.03/x86/openwrt-x86-rootfs.tgz | docker import - katta/openwrt-rootfs:10.03 | |
docker push katta/openwrt-rootfs:10.03 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker run -d --name=openwrt --privileged