28 lines
612 B
Docker
28 lines
612 B
Docker
FROM debian:bookworm-slim AS base
|
|
|
|
LABEL maintainer="OpenWrt Builder"
|
|
|
|
# Install required dependencies
|
|
COPY ./dependencies.sh /install_dependencies
|
|
RUN chmod +x /install_dependencies && \
|
|
/install_dependencies && \
|
|
rm -rf /install_dependencies
|
|
|
|
# Create a non-root user for building
|
|
RUN useradd -G sudo -m -u 1000 builder
|
|
|
|
USER builder
|
|
WORKDIR /home/builder
|
|
|
|
FROM base
|
|
|
|
RUN git clone --depth=1 https://github.com/lkiuyu/immortalwrt openwrt
|
|
|
|
# Restoring default feeds.
|
|
COPY mods/feeds.conf.default openwrt/
|
|
|
|
RUN openwrt/scripts/feeds update -a && \
|
|
openwrt/scripts/feeds install -a
|
|
|
|
CMD ["/bin/bash"]
|