28 lines
585 B
Docker
28 lines
585 B
Docker
FROM debian:bookworm-slim AS base
|
|
|
|
LABEL maintainer="OpenWrt Builder"
|
|
|
|
# Install required dependencies
|
|
COPY dependencies.sh /dependencies.sh
|
|
RUN chmod +x /dependencies.sh && \
|
|
/dependencies.sh && \
|
|
rm -rf /dependencies.sh
|
|
|
|
# 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 feeds.conf.default openwrt/
|
|
|
|
RUN openwrt/scripts/feeds update -a && \
|
|
openwrt/scripts/feeds install -a
|
|
|
|
CMD ["/bin/bash"]
|