Skip to content

Commit

Permalink
Docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvdb committed Oct 3, 2023
1 parent 86b03c7 commit 3352f45
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
"name": "C++",
"build": {
"dockerfile": "../Dockerfile.develop"
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "gcc -v",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
29 changes: 29 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
deps/vcpkg/packages
deps/vcpkg/buildtrees
deps/vcpkg/vcpkg
deps/vcpkg/vcpkg.exe
LICENSE
README.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ compile_commands.json
vcpkg_installed
build
vcpkgs-*
.cache
30 changes: 30 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@
],
"displayName": "Mac x64",
"description": "Vcpkg build for x64 on mac"
},
{
"name": "arm64-linux",
"inherits": [
"vcpkg-base",
"triplet-arm64-linux"
],
"displayName": "arm64 Linux Docker",
"description": "Vcpkg build for arm64 on macOS",
"cacheVariables": {
"VCPKG_INSTALLED_DIR": "/usr/vcpkgs-arm64-linux"
}
}
],
"buildPresets": [
Expand Down Expand Up @@ -133,6 +145,24 @@
"inherits": [
"build-mac-only"
]
},
{
"name": "Debug docker arm64",
"displayName": "Debug",
"configurePreset": "arm64-linux",
"configuration": "Debug",
"inherits": [
"build-linux-only"
]
},
{
"name": "Release docker arm64",
"displayName": "Release",
"configurePreset": "arm64-linux",
"configuration": "Release",
"inherits": [
"build-linux-only"
]
}
],
"testPresets": [
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile.develop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12

USER root
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends ninja-build nasm automake autoconf autoconf-archive libtool pkg-config
RUN mkdir -p /usr/deps/
COPY ./bootstrap.py /usr/
COPY ./vcpkg.json /usr/
COPY ./deps/vcpkg /usr/deps/vcpkg
RUN chmod +x /usr/bootstrap.py
WORKDIR /usr
ENV VCPKG_FORCE_SYSTEM_BINARIES=1
RUN ./bootstrap.py --triplet arm64-linux --clean-after-build
2 changes: 1 addition & 1 deletion deps/vcpkg

0 comments on commit 3352f45

Please sign in to comment.