forked from foxglove/ws-protocol
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdev.Dockerfile
More file actions
52 lines (41 loc) · 1.7 KB
/
dev.Dockerfile
File metadata and controls
52 lines (41 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM ubuntu:jammy AS base
# https://askubuntu.com/questions/909277/avoiding-user-interaction-with-tzdata-when-installing-certbot-in-a-docker-contai
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
ca-certificates \
curl \
cmake \
gnupg \
make \
perl \
python3 \
python3-pip \
clang \
clang-format
ENV CC=clang
ENV CXX=clang++
WORKDIR /src
FROM base AS build
RUN pip --no-cache-dir install conan
RUN conan profile detect --force
COPY ./foxglove-websocket/conanfile.py /src/foxglove-websocket/conanfile.py
ARG CPPSTD=17
ARG ASIO=standalone
RUN conan install foxglove-websocket -s compiler.cppstd=$CPPSTD -o foxglove-websocket*:asio=$ASIO --build=missing
COPY ./foxglove-websocket /src/foxglove-websocket/
RUN conan create foxglove-websocket -s compiler.cppstd=$CPPSTD -o foxglove-websocket*:asio=$ASIO -c tools.build:cxxflags="['-Werror']"
FROM build AS build_examples
COPY --from=build /root/.conan2 /root/.conan2
COPY ./examples /src/examples
RUN conan build examples --output-folder examples/ -s compiler.cppstd=$CPPSTD --build=missing
FROM build_examples AS example_server_protobuf
CMD ["examples/build/Release/example_server_protobuf"]
FROM build_examples AS example_server_flatbuffers
CMD ["examples/build/Release/example_server_flatbuffers", "/src/examples/autogenerated_flatbuffers/SceneUpdate.bfbs"]
FROM build_examples AS example_server_json
CMD ["examples/build/Release/example_server_json"]
FROM build_examples AS example_server_perf_test
CMD ["examples/build/Release/example_server_perf_test"]
FROM build_examples AS example_client_perf_test
CMD ["examples/build/Release/example_client_perf_test"]