Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dockerfile for linux builds #156

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# syntax=docker/dockerfile:1.4
ARG UBUNTU_BASE=ubuntu:18.04
ARG UBUNTU_BASE=ubuntu:20.04
FROM $UBUNTU_BASE

ENV DEBIAN_FRONTEND=noninteractive

RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt update && apt-get install --no-install-recommends -y libc-dev curl zip unzip ca-certificates busybox git-core pkg-config software-properties-common
apt update && apt-get install --no-install-recommends -y libc-dev curl zip unzip ca-certificates busybox git-core pkg-config software-properties-common make

RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt <<EOT bash -ue
mkdir -p /opt/cmake /opt/ninja
Expand All @@ -16,6 +18,12 @@ RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/
apt install -y g++-11 python3-distutils
EOT

RUN <<EOT bash -ue
git clone https://github.com/microsoft/vcpkg.git
EOT

ENV VCPKG_ROOT=/vcpkg

ARG CMAKE_ARGS=""

ENV CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11
Expand Down
4 changes: 1 addition & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/sh



exec docker build -f $(dirname $0)/Dockerfile --progress=plain $(dirname $0)/.. --output ${1:?pass output directory as first argument}
exec docker buildx build --platform linux/amd64 -f $(dirname $0)/Dockerfile --progress=tty $(dirname $0)/.. --output ${1:?pass output directory as first argument}
Loading