mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-02-09 13:46:55 +02:00
49 lines
1.4 KiB
Docker
49 lines
1.4 KiB
Docker
#
|
|
# Dockerfile for openwrt
|
|
#
|
|
|
|
FROM debian:jessie
|
|
MAINTAINER kev <noreply@easypi.info>
|
|
|
|
RUN set -xe \
|
|
&& apt-get update \
|
|
&& apt-get install -y build-essential \
|
|
curl \
|
|
file \
|
|
gawk \
|
|
gettext \
|
|
git \
|
|
libncurses5-dev \
|
|
libssl-dev \
|
|
mercurial \
|
|
python \
|
|
subversion \
|
|
sudo \
|
|
tree \
|
|
unzip \
|
|
wget \
|
|
xsltproc \
|
|
zlib1g-dev \
|
|
&& useradd -m openwrt \
|
|
&& echo 'openwrt ALL=NOPASSWD: ALL' > /etc/sudoers.d/openwrt
|
|
|
|
USER openwrt
|
|
WORKDIR /home/openwrt
|
|
|
|
ENV OPENWRT_VERSION=trunk
|
|
ENV OPENWRT_URL=https://downloads.openwrt.org/snapshots/trunk/ramips/mt7628
|
|
ENV OPENWRT_IMG=OpenWrt-ImageBuilder-ramips-mt7628.Linux-x86_64
|
|
ENV OPENWRT_SDK=OpenWrt-SDK-ramips-mt7628_gcc-5.3.0_musl-1.1.14.Linux-x86_64
|
|
ENV OPENWRT_IMG_URL=${OPENWRT_URL}/${OPENWRT_IMG}.tar.bz2
|
|
ENV OPENWRT_SDK_URL=${OPENWRT_URL}/${OPENWRT_SDK}.tar.bz2
|
|
|
|
RUN set -xe \
|
|
&& curl -sSL ${OPENWRT_IMG_URL} | tar xj \
|
|
&& curl -sSL ${OPENWRT_SDK_URL} | tar xj \
|
|
&& ln -s ${OPENWRT_IMG} img \
|
|
&& ln -s ${OPENWRT_SDK} sdk \
|
|
&& cd sdk \
|
|
&& ./scripts/feeds update -a
|
|
|
|
CMD ["bash"]
|