-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
36 lines (24 loc) · 885 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM ubuntu:18.04 as BUILD
ENV OPENWRT_VERSION='lede-17.01'
RUN apt-get update && \
apt-get install -y build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib \
flex git-core gettext libssl-dev unzip python wget
ADD 0001-Zsun.patch /usr/src/0001-Zsun.patch
RUN cd /usr/src && \
git clone -b "$OPENWRT_VERSION" https://github.com/openwrt/openwrt openwrt && \
cd openwrt && \
patch -p1 < ../0001-Zsun.patch && \
./scripts/feeds update -a && \
./scripts/feeds install -a
ADD config.txt /usr/src/openwrt/.config
WORKDIR /usr/src/openwrt
RUN make defconfig && \
make download
RUN make -j"$(nproc)" FORCE_UNSAFE_CONFIGURE=1 V=s && \
rm -rf build_dir
FROM alpine
COPY --from=BUILD /usr/src/openwrt/bin /root/openwrt
RUN apk --no-cache add python
WORKDIR /root/openwrt
EXPOSE 80
CMD python -m SimpleHTTPServer 80