-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
40 lines (32 loc) · 1.3 KB
/
Dockerfile
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
38
39
40
FROM debian:8
MAINTAINER Bilge <[email protected]>
WORKDIR /root
# Install dependencies.
RUN apt-get update && DEBIAN_FRONTEND=noninteractive\
apt-get install -y build-essential libncurses5-dev rsync cpio python unzip bc wget
# Install Buildroot.
RUN wget -nv https://buildroot.org/downloads/buildroot-2018.02.6.tar.bz2 &&\
tar xf buildroot-*.tar* &&\
rm buildroot-*.tar* &&\
ln -s buildroot-* buildroot &&\
mkdir -v buildroot/patches
# Create rootfs overlay.
RUN mkdir -vpm775 buildroot/rootfs_overlay/srv
# Install toolchain.
RUN wget -nv https://github.com/Docker-nano/crosstool-NG/releases/download/2.1.0/x86_64-nano-linux-uclibc.tar.xz &&\
tar xf *.tar* &&\
ln -s "$(tar tf *.tar* | head -1)" toolchain &&\
rm *.tar*
# Install BusyBox.
RUN wget -nv https://busybox.net/downloads/busybox-1.27.2.tar.bz2 &&\
tar xf *.tar* &&\
rm *.tar* &&\
ln -s busybox-* busybox &&\
ln -s ~/busybox/.config /etc/busybox.conf
COPY in/buildroot /usr/local/bin/
COPY in/buildroot-configure /usr/local/bin/
COPY in/busybox-configure /usr/local/bin/
COPY in/buildroot.conf /root/buildroot/.config
COPY in/post_build.sh /root/buildroot/
COPY in/busybox.conf /root/busybox/.config
RUN echo "alias ll='ls -lah --color=auto'" >> .bashrc