Skip to content

Instantly share code, notes, and snippets.

@Kline-
Created September 29, 2024 13:03
Show Gist options
  • Save Kline-/eedbf8abc3ccdb967c46e72c23732966 to your computer and use it in GitHub Desktop.
Save Kline-/eedbf8abc3ccdb967c46e72c23732966 to your computer and use it in GitHub Desktop.
A dockerfile to setup an OpenWRT build environment. Update the VERS var as needed.
FROM debian:stable
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
sudo time git-core subversion build-essential gcc-multilib \
libncurses5-dev zlib1g-dev gawk flex gettext wget unzip \
grep rsync python3 python3-distutils file && \
apt-get clean
RUN useradd -m openwrt && \
echo 'openwrt ALL=NOPASSWD: ALL' > /etc/sudoers.d/openwrt
USER openwrt
WORKDIR /home/openwrt
ENV VERS=openwrt-23.05
RUN git clone git://git.openwrt.org/openwrt/openwrt.git -b $VERS $VERS
WORKDIR /home/openwrt/$VERS
RUN scripts/feeds update -a && \
scripts/feeds install -a
ENTRYPOINT ["bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment