Add Docker Compose basic environment

This commit is contained in:
2018-09-17 17:51:14 +02:00
parent 9b11769a70
commit 3d693f0632
4 changed files with 76 additions and 1 deletions

View File

@ -0,0 +1,40 @@
FROM alpine:3.7 AS downloader
ARG HTTP_PROXY=""
ARG HTTPS_PROXY=""
ARG http_proxy=""
ARG https_proxy=""
ARG OPENWRT_VERSION=18.06.1
RUN apk add --no-cache wget tar
RUN wget -O openwrt.tar.gz https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/x86/generic/openwrt-${OPENWRT_VERSION}-x86-generic-generic-rootfs.tar.gz\
&& mkdir /openwrt \
&& tar -C /openwrt -xzf openwrt.tar.gz
FROM scratch
COPY --from=downloader /openwrt /
RUN mkdir -p /var/lock \
&& mkdir -p /var/run
USER root
# Install and enable Luci
RUN opkg update\
&& opkg install luci luci-mod-rpc\
&& /etc/init.d/uhttpd enable
RUN rm /lib/preinit/* &&\
echo > /lib/preinit/00_empty_dummy_script &&\
/etc/init.d/cron disable &&\
/etc/init.d/gpio_switch disable &&\
/etc/init.d/led disable &&\
/etc/init.d/dropbear disable &&\
/etc/init.d/network disable &&\
/etc/init.d/odhcpd disable &&\
/etc/init.d/sysctl disable &&\
/etc/init.d/sysfixtime disable &&\
/etc/init.d/sysntpd disable
CMD /sbin/init