mirror of
https://github.com/rancher/os.git
synced 2025-07-14 07:04:03 +00:00
59 lines
2.0 KiB
Docker
59 lines
2.0 KiB
Docker
FROM ubuntu:15.10
|
|
|
|
RUN apt-get update && \
|
|
apt-get -y install locales sudo vim less curl wget git rsync build-essential syslinux isolinux xorriso \
|
|
libblkid-dev libmount-dev libselinux1-dev cpio genisoimage qemu-kvm python-pip ca-certificates pkg-config
|
|
|
|
RUN locale-gen en_US.UTF-8
|
|
ENV LANG en_US.UTF-8
|
|
ENV PATH $PATH:/usr/local/go/bin
|
|
RUN mkdir -p /go/src /go/bin && chmod -R 777 /go
|
|
ENV GOPATH /go
|
|
ENV PATH /go/bin:$PATH
|
|
|
|
RUN pip install tox
|
|
RUN curl -sSL https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz | tar -xz -C /usr/local
|
|
RUN curl -sL https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 > /usr/local/bin/docker
|
|
RUN chmod +x /usr/local/bin/docker
|
|
|
|
ENV DAPPER_DOCKER_SOCKET true
|
|
ENV DAPPER_SOURCE /go/src/github.com/rancher/os
|
|
ENV DAPPER_OUTPUT ./bin ./dist
|
|
ENV DAPPER_RUN_ARGS --privileged
|
|
ENV SHELL /bin/bash
|
|
WORKDIR ${DAPPER_SOURCE}
|
|
|
|
COPY .dockerignore.docker .dockerignore
|
|
|
|
RUN cd /usr/local/src && \
|
|
for i in libselinux pcre3 util-linux; do \
|
|
apt-get build-dep -y $i && \
|
|
apt-get source -y $i \
|
|
;done
|
|
|
|
RUN apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
|
RUN cd /usr/local/src/pcre3-* && \
|
|
autoreconf && \
|
|
CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ ./configure --host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf && \
|
|
make -j$(nproc) && \
|
|
make install
|
|
|
|
RUN cd /usr/local/src/libselinux-* && \
|
|
CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ make CFLAGS=-Wall && \
|
|
make PREFIX=/usr/arm-linux-gnueabihf DESTDIR=/usr/arm-linux-gnueabihf install
|
|
|
|
RUN cd /usr/local/src/util-linux-* && \
|
|
autoreconf && \
|
|
CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ ./configure --host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf \
|
|
--disable-all-programs \
|
|
--enable-libmount \
|
|
--enable-libblkid \
|
|
--enable-libuuid \
|
|
--enable-mount && \
|
|
make -j$(nproc) && \
|
|
make install
|
|
|
|
CMD make all
|
|
|
|
ENV DAPPER_OUTPUT ./bin ./dist ./build/os-config.yml
|