mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 08:24:25 +01:00
base: Split into Dockerfile.in and common.docker
So common.docker can be re-used in other images that are not built FROM base.
This commit is contained in:
parent
59ba030070
commit
755f45b412
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
bin
|
||||
dockcross
|
||||
*/test/
|
||||
Dockerfile
|
||||
|
78
Dockerfile
78
Dockerfile
@ -1,78 +0,0 @@
|
||||
FROM debian:jessie
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
# Insert this line before "RUN apt-get update" to dynamically
|
||||
# replace httpredir.debian.org with a single working domain
|
||||
# in attempt to "prevent" the "Error reading from server" error.
|
||||
RUN apt-get update && apt-get install -y curl && \
|
||||
sed -i "s/httpredir.debian.org/`curl -s -D - http://httpredir.debian.org/demo/debian/ | awk '/^Link:/ { print $2 }' | sed -e 's@<http://\(.*\)/debian/>;@\1@g'`/" /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get -y install \
|
||||
automake \
|
||||
autogen \
|
||||
bash \
|
||||
build-essential \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
file \
|
||||
git \
|
||||
gzip \
|
||||
libcurl4-openssl-dev \
|
||||
libssl-dev \
|
||||
make \
|
||||
ncurses-dev \
|
||||
pkg-config \
|
||||
libtool \
|
||||
python \
|
||||
rsync \
|
||||
sed \
|
||||
bison \
|
||||
flex \
|
||||
tar \
|
||||
vim \
|
||||
wget \
|
||||
runit \
|
||||
xz-utils && \
|
||||
apt-get -y clean
|
||||
|
||||
WORKDIR /usr/share
|
||||
RUN git clone https://github.com/nojhan/liquidprompt.git && \
|
||||
cd liquidprompt && \
|
||||
git checkout v_1.11
|
||||
COPY imagefiles/.bashrc /root/
|
||||
|
||||
# Build and install CMake from source.
|
||||
WORKDIR /usr/src
|
||||
RUN git clone git://cmake.org/cmake.git CMake && \
|
||||
cd CMake && \
|
||||
git checkout v3.6.1 && \
|
||||
cd .. && mkdir CMake-build && cd CMake-build && \
|
||||
/usr/src/CMake/bootstrap \
|
||||
--parallel=$(nproc) \
|
||||
--prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
./bin/cmake -DCMAKE_USE_SYSTEM_CURL:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_USE_OPENSSL:BOOL=ON . && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf CMake*
|
||||
# Wrappers that point to CMAKE_TOOLCHAIN_FILE
|
||||
|
||||
# Build and install Ninja from source
|
||||
RUN git clone https://github.com/martine/ninja.git && \
|
||||
cd ninja && \
|
||||
git checkout v1.7.1 && \
|
||||
python ./configure.py --bootstrap && \
|
||||
./ninja && \
|
||||
cp ./ninja /usr/bin/ && \
|
||||
cd .. && rm -rf ninja
|
||||
COPY imagefiles/cmake.sh /usr/local/bin/cmake
|
||||
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
|
||||
|
||||
RUN echo "root:root" | chpasswd
|
||||
WORKDIR /work
|
||||
ENTRYPOINT ["/dockcross/entrypoint.sh"]
|
||||
|
||||
COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/
|
36
Dockerfile.in
Normal file
36
Dockerfile.in
Normal file
@ -0,0 +1,36 @@
|
||||
FROM debian:jessie
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
RUN apt-get update && apt-get install -y curl && \\
|
||||
sed -i "s/httpredir.debian.org/`curl -s -D - http://httpredir.debian.org/demo/debian/ | awk '/^Link:/ { print $2 }' | sed -e 's@<http://\(.*\)/debian/>;@\1@g'`/" /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update && apt-get -y install \\
|
||||
automake \\
|
||||
autogen \\
|
||||
bash \\
|
||||
build-essential \\
|
||||
bzip2 \\
|
||||
ca-certificates \\
|
||||
curl \\
|
||||
file \\
|
||||
git \\
|
||||
gzip \\
|
||||
libcurl4-openssl-dev \\
|
||||
libssl-dev \\
|
||||
make \\
|
||||
ncurses-dev \\
|
||||
pkg-config \\
|
||||
libtool \\
|
||||
python \\
|
||||
rsync \\
|
||||
sed \\
|
||||
bison \\
|
||||
flex \\
|
||||
tar \\
|
||||
vim \\
|
||||
wget \\
|
||||
runit \\
|
||||
xz-utils && \\
|
||||
apt-get -y clean
|
||||
|
||||
#include "common.docker"
|
10
Makefile
10
Makefile
@ -71,6 +71,13 @@ linux-ppc64le.test: linux-ppc64le test/run.py
|
||||
$(DOCKER) run --rm dockcross/linux-ppc64le > $(BIN)/dockcross-linux-ppc64le && chmod +x $(BIN)/dockcross-linux-ppc64le
|
||||
$(BIN)/dockcross-linux-ppc64le python test/run.py --languages C
|
||||
|
||||
manylinux-x64: base manylinux-x64/Dockerfile
|
||||
$(DOCKER) build -t $(ORG)/manylinux-x64 manylinux-x64
|
||||
|
||||
manylinux-x64.test: manylinux-x64 test/run.py
|
||||
$(DOCKER) run --rm dockcross/manylinux-x64 > $(BIN)/dockcross-manylinux-x64 && chmod +x $(BIN)/dockcross-manylinux-x64
|
||||
$(BIN)/dockcross-manylinux-x64 python test/run.py
|
||||
|
||||
windows-x86: base windows-x86/Dockerfile windows-x86/settings.mk
|
||||
$(DOCKER) build -t $(ORG)/windows-x86 windows-x86
|
||||
|
||||
@ -85,6 +92,9 @@ windows-x64.test: windows-x64 test/run.py
|
||||
$(DOCKER) run --rm dockcross/windows-x64 > $(BIN)/dockcross-windows-x64 && chmod +x $(BIN)/dockcross-windows-x64
|
||||
$(BIN)/dockcross-windows-x64 python test/run.py --exe-suffix ".exe"
|
||||
|
||||
Dockerfile: Dockerfile.in common.docker
|
||||
cpp -o Dockerfile Dockerfile.in
|
||||
|
||||
base: Dockerfile
|
||||
$(DOCKER) build -t $(ORG)/base .
|
||||
|
||||
|
37
common.docker
Normal file
37
common.docker
Normal file
@ -0,0 +1,37 @@
|
||||
WORKDIR /usr/share
|
||||
RUN git clone "https://github.com/nojhan/liquidprompt.git" && \\
|
||||
cd liquidprompt && \\
|
||||
git checkout v_1.11
|
||||
COPY imagefiles/.bashrc /root/
|
||||
|
||||
WORKDIR /usr/src
|
||||
RUN git clone "https://cmake.org/cmake.git" CMake && \\
|
||||
cd CMake && \\
|
||||
git checkout v3.6.1 && \\
|
||||
cd .. && mkdir CMake-build && cd CMake-build && \\
|
||||
/usr/src/CMake/bootstrap \\
|
||||
--parallel=$(nproc) \\
|
||||
--prefix=/usr && \\
|
||||
make -j$(nproc) && \\
|
||||
./bin/cmake -DCMAKE_USE_SYSTEM_CURL:BOOL=ON \\
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \\
|
||||
-DCMAKE_USE_OPENSSL:BOOL=ON . && \\
|
||||
make install && \\
|
||||
cd .. && \\
|
||||
rm -rf CMake*
|
||||
|
||||
RUN git clone "https://github.com/martine/ninja.git" && \\
|
||||
cd ninja && \\
|
||||
git checkout v1.7.1 && \\
|
||||
python ./configure.py --bootstrap && \\
|
||||
./ninja && \\
|
||||
cp ./ninja /usr/bin/ && \\
|
||||
cd .. && rm -rf ninja
|
||||
COPY imagefiles/cmake.sh /usr/local/bin/cmake
|
||||
COPY imagefiles/ccmake.sh /usr/local/bin/ccmake
|
||||
|
||||
RUN echo "root:root" | chpasswd
|
||||
WORKDIR /work
|
||||
ENTRYPOINT ["/dockcross/entrypoint.sh"]
|
||||
|
||||
COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/
|
Loading…
Reference in New Issue
Block a user