forked from geerlingguy/pi-router
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 1.04 KB
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
37
FROM debian:bullseye
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get clean && apt-get update && \
apt-get install -y \
build-essential gawk luajit flex git gettext \
python3-distutils rsync unzip wget nano file \
libssl-dev zlib1g-dev curl \
gcc-multilib libncurses-dev libncursesw-dev \
xsltproc python3
RUN mkdir -p /root/.ssh
RUN chmod 644 /root/.ssh
# Add build user.
RUN useradd -ms /bin/bash build
# Create build directory.
RUN mkdir /build && chown build:build /build
WORKDIR /build
# Clone OpenWRT.
USER build
RUN git clone --branch openwrt-22.03 https://git.openwrt.org/openwrt/openwrt.git
WORKDIR /build/openwrt
# Download and apply the patch for the fan controller
RUN curl -0 /build/openwrt/emc2301-openwrt.patch https://gist.githubusercontent.com/shayne/bc9f3778b53134d3274f9794eba4f874/raw/9b455e2ef262b729800ea8009e8a774966110c6c/emc2301-openwrt.patch
# RUN cd /build/openwrt/ && git apply ./emc2301-openwrt.patch
# Update the feeds.
RUN ./scripts/feeds update -a
RUN ./scripts/feeds install -a
CMD ["bash"]