Skip to content

Instantly share code, notes, and snippets.

@jakoch
Last active July 20, 2023 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakoch/2217dd487d345021637402a5b0a48bdc to your computer and use it in GitHub Desktop.
Save jakoch/2217dd487d345021637402a5b0a48bdc to your computer and use it in GitHub Desktop.
setup vcpkg in docker container
# +-----------------------------+
# | vcpkg ~225MB|
# +-----------------------------+
#
# replaced by devcontainer.feature: ghcr.io/msclock/features/vcpkg:1
#
# https://github.com/microsoft/vcpkg/blob/master/README.md#quick-start-unix
ENV VCPKG_ROOT=/usr/local/vcpkg
ENV PATH="${PATH}:${VCPKG_ROOT}"
ENV VCPKG_DOWNLOADS=/usr/local/vcpkg-downloads
ENV VCPKG_TRIPLET=x64-linux
ENV VCPKG_USE_SYSTEM_BINARIES=1
RUN mkdir -p $VCPKG_DOWNLOADS && mkdir -p $VCPKG_ROOT
# Clone Repo
RUN git clone --depth=1 \
-c core.eol=lf \
-c core.autocrlf=false \
-c fsck.zeroPaddedFilemode=ignore \
-c fetch.fsck.zeroPaddedFilemode=ignore \
-c receive.fsck.zeroPaddedFilemode=ignore \
https://github.com/microsoft/vcpkg.git $VCPKG_ROOT
# Run VCPKG installer
RUN $VCPKG_ROOT/bootstrap-vcpkg.sh -disableMetrics
# VCPKG install default packages globally
RUN $VCPKG_ROOT/vcpkg integrate install && \
$VCPKG_ROOT/vcpkg install gtest catch2 spdlog fmt nlohmann-json && \
rm -rf $VCPKG_ROOT/buildtrees $VCPKG_ROOT/downloads/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment