Update archlinux images
This commit is contained in:
@@ -1,92 +1,11 @@
|
||||
# Create a virtual environment with all tools installed
|
||||
# ref: https://hub.docker.com/_/archlinux/
|
||||
FROM archlinux/base AS env
|
||||
FROM archlinux/base AS base
|
||||
LABEL maintainer="mizux.dev@gmail.com"
|
||||
# Install system build dependencies
|
||||
ENV PATH=$PATH:/usr/local/bin
|
||||
ENV PATH=/usr/local/bin:$PATH
|
||||
RUN pacman -Syu --noconfirm git base-devel cmake
|
||||
CMD [ "/bin/sh" ]
|
||||
|
||||
|
||||
|
||||
# Add the library src to our build env
|
||||
FROM env AS cpp
|
||||
# Create lib directory
|
||||
WORKDIR /home/lib
|
||||
# Bundle lib source
|
||||
COPY . .
|
||||
# CMake version
|
||||
RUN cmake -version
|
||||
# CMake configure
|
||||
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON
|
||||
# CMake build
|
||||
RUN cmake --build build --target all -v
|
||||
# CMake build
|
||||
RUN cmake --build build --target install
|
||||
|
||||
|
||||
|
||||
# Add the library src to our build env
|
||||
FROM env AS python
|
||||
# Swig install
|
||||
FROM base AS swig
|
||||
RUN pacman -Syu --noconfirm swig
|
||||
# Python install
|
||||
RUN pacman -Syu --noconfirm python python-pip
|
||||
# Create lib directory
|
||||
WORKDIR /home/lib
|
||||
# Bundle lib source
|
||||
COPY . .
|
||||
# CMake configure
|
||||
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_PYTHON=ON
|
||||
# CMake build
|
||||
RUN cmake --build build --target all -v
|
||||
# CMake build
|
||||
RUN cmake --build build --target install
|
||||
|
||||
|
||||
|
||||
# Add the library src to our build env
|
||||
FROM env AS java
|
||||
# Swig install
|
||||
RUN pacman -Syu --noconfirm swig
|
||||
# Java install
|
||||
RUN pacman -Syu --noconfirm jdk-openjdk
|
||||
# Create lib directory
|
||||
WORKDIR /home/lib
|
||||
# Bundle lib source
|
||||
COPY . .
|
||||
# CMake configure
|
||||
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_JAVA=ON
|
||||
# CMake build
|
||||
RUN cmake --build build --target all -v
|
||||
# CMake build
|
||||
RUN cmake --build build --target install
|
||||
|
||||
|
||||
|
||||
# Add the library src to our build env
|
||||
FROM env AS dotnet
|
||||
# Swig install
|
||||
RUN pacman -Syu --noconfirm swig
|
||||
# .Net install
|
||||
RUN pacman -Syu --noconfirm dotnet-sdk
|
||||
# Create lib directory
|
||||
WORKDIR /home/lib
|
||||
# Bundle lib source
|
||||
COPY . .
|
||||
# CMake configure
|
||||
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_DOTNET=ON
|
||||
# CMake build
|
||||
RUN cmake --build build --target all -v
|
||||
# CMake build
|
||||
RUN cmake --build build --target install
|
||||
|
||||
|
||||
|
||||
# Create an install image
|
||||
FROM env AS install_cpp
|
||||
# Copy lib from devel to prod
|
||||
COPY --from=cpp /usr/local /usr/local/
|
||||
# Copy sample
|
||||
WORKDIR /home/sample
|
||||
COPY ci/sample .
|
||||
|
||||
29
cmake/docker/archlinux/cpp.Dockerfile
Normal file
29
cmake/docker/archlinux/cpp.Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM ortools:archlinux_base AS env
|
||||
RUN cmake -version
|
||||
|
||||
FROM env AS devel
|
||||
WORKDIR /home/lib
|
||||
COPY . .
|
||||
|
||||
FROM devel AS build
|
||||
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON
|
||||
RUN cmake --build build --target all -v
|
||||
RUN cmake --build build --target install
|
||||
|
||||
FROM build AS test
|
||||
RUN cmake --build build --target test
|
||||
|
||||
FROM env AS install_env
|
||||
COPY --from=build /usr/local /usr/local/
|
||||
|
||||
FROM install_env AS install_devel
|
||||
WORKDIR /home/sample
|
||||
COPY ci/sample .
|
||||
|
||||
FROM install_devel AS install_build
|
||||
RUN cmake -S. -Bbuild
|
||||
RUN cmake --build build --target all -v
|
||||
RUN cmake --build build --target install
|
||||
|
||||
FROM install_build AS install_test
|
||||
RUN cmake --build build --target test
|
||||
29
cmake/docker/archlinux/dotnet.Dockerfile
Normal file
29
cmake/docker/archlinux/dotnet.Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM ortools:archlinux_swig AS env
|
||||
RUN pacman -Syu --noconfirm dotnet-sdk
|
||||
|
||||
FROM env AS devel
|
||||
WORKDIR /home/lib
|
||||
COPY . .
|
||||
|
||||
FROM devel AS build
|
||||
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_DOTNET=ON
|
||||
RUN cmake --build build --target all -v
|
||||
RUN cmake --build build --target install
|
||||
|
||||
FROM build AS test
|
||||
RUN cmake --build build --target test
|
||||
|
||||
FROM env AS install_env
|
||||
COPY --from=build /usr/local /usr/local/
|
||||
|
||||
FROM install_env AS install_devel
|
||||
WORKDIR /home/sample
|
||||
COPY ci/sample .
|
||||
|
||||
FROM install_devel AS install_build
|
||||
RUN cmake -S. -Bbuild -DBUILD_DOTNET=ON
|
||||
RUN cmake --build build --target all -v
|
||||
RUN cmake --build build --target install
|
||||
|
||||
FROM install_build AS install_test
|
||||
RUN cmake --build build --target test
|
||||
29
cmake/docker/archlinux/java.Dockerfile
Normal file
29
cmake/docker/archlinux/java.Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM ortools:archlinux_swig AS env
|
||||
RUN pacman -Syu --noconfirm jdk-openjdk maven
|
||||
|
||||
FROM env AS devel
|
||||
WORKDIR /home/lib
|
||||
COPY . .
|
||||
|
||||
FROM devel AS build
|
||||
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_JAVA=ON
|
||||
RUN cmake --build build --target all -v
|
||||
RUN cmake --build build --target install
|
||||
|
||||
FROM build AS test
|
||||
RUN cmake --build build --target test
|
||||
|
||||
FROM env AS install_env
|
||||
COPY --from=build /usr/local /usr/local/
|
||||
|
||||
FROM install_env AS install_devel
|
||||
WORKDIR /home/sample
|
||||
COPY ci/sample .
|
||||
|
||||
FROM install_devel AS install_build
|
||||
RUN cmake -S. -Bbuild -DBUILD_DOTNET=ON
|
||||
RUN cmake --build build --target all -v
|
||||
RUN cmake --build build --target install
|
||||
|
||||
FROM install_build AS install_test
|
||||
RUN cmake --build build --target test
|
||||
29
cmake/docker/archlinux/python.Dockerfile
Normal file
29
cmake/docker/archlinux/python.Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM ortools:archlinux_swig AS env
|
||||
RUN pacman -Syu --noconfirm python python-pip
|
||||
|
||||
FROM env AS devel
|
||||
WORKDIR /home/lib
|
||||
COPY . .
|
||||
|
||||
FROM devel AS build
|
||||
RUN cmake -S. -Bbuild -DBUILD_DEPS=ON -DBUILD_PYTHON=ON
|
||||
RUN cmake --build build --target all -v
|
||||
RUN cmake --build build --target install
|
||||
|
||||
FROM build AS test
|
||||
RUN cmake --build build --target test
|
||||
|
||||
FROM env AS install_env
|
||||
COPY --from=build /usr/local /usr/local/
|
||||
|
||||
FROM install_env AS install_devel
|
||||
WORKDIR /home/sample
|
||||
COPY ci/sample .
|
||||
|
||||
FROM install_devel AS install_build
|
||||
RUN cmake -S. -Bbuild
|
||||
RUN cmake --build build --target all -v
|
||||
RUN cmake --build build --target install
|
||||
|
||||
FROM install_build AS install_test
|
||||
RUN cmake --build build --target test
|
||||
Reference in New Issue
Block a user