Skip to content

Commit c601b59

Browse files
committed
Use docker-compose
1 parent 42b6d32 commit c601b59

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

Diff for: Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
# syntax=docker/dockerfile:1.3
12
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.217.4/containers/cpp/.devcontainer/base.Dockerfile
23

34
# [Choice] Debian / Ubuntu version (use Debian 11, Ubuntu 18.04/21.04 on local arm64/Apple Silicon): debian-11, debian-10, ubuntu-21.04, ubuntu-20.04, ubuntu-18.04
45
ARG VARIANT="bullseye"
5-
ARG COMPILER="clang13"
66

77
#
88
# Basic dev tools and Drogon dependencies
@@ -29,6 +29,9 @@ FROM base AS clang11
2929
RUN export DEBIAN_FRONTEND=noninteractive \
3030
&& apt-get update \
3131
&& apt-get -y install clang lldb llvm
32+
# Build the repository
33+
RUN --mount=type=bind,target=/code,source=. cmake -S /code -B /build && cmake --build /build
34+
WORKDIR /code
3235

3336
#
3437
# Clang 13
@@ -41,3 +44,6 @@ RUN echo "deb-src http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main"
4144
RUN export DEBIAN_FRONTEND=noninteractive \
4245
&& apt-get update \
4346
&& apt-get -y install clang-13 llvm-13 lldb-13
47+
# Build the repository
48+
RUN --mount=type=bind,target=/code,source=. cmake -S /code -B /build && cmake --build /build
49+
WORKDIR /code

Diff for: README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@ Clutter Benchmark
33

44
This benchmark is designed to benchmark the speed of various JSON parsers when handling web requests.
55

6+
Quickstart
7+
----------
8+
69
```bash
7-
cmake -B build
8-
cmake --build build
10+
docker compose run clang13
11+
cmake --build /build
912
```
1013

1114
Subsequently, you only need to run `cmake --build build` to rebuild.
15+
16+
Visual Studio Code
17+
------------------
18+
19+
If you are developing in Visual Studio Code, this project will start in a dev container with the
20+
environment all initialized.

Diff for: docker-compose.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: "3.9" # optional since v1.27.0
2+
services:
3+
clang13:
4+
build:
5+
target: clang13
6+
volumes: [ .:/code ]

0 commit comments

Comments
 (0)