forked from eclipse-zenoh/zenoh-plugin-dds
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
59 lines (46 loc) · 1.43 KB
/
Dockerfile
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
53
54
55
56
57
58
59
# Copyright (c) 2017, 2020 ADLINK Technology Inc.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# ADLINK zenoh team, <[email protected]>
###
### Build part
###
FROM rust:slim as builder
WORKDIR /usr/src/zenoh-plugin-dds
# Required for correct installation of maven package
RUN mkdir /usr/share/man/man1/
# List of installed tools:
# * for CycloneDDS
# - g++
# - cmake
# - libssl-dev
# - openjdk-11-jdk-headless
# - maven
# * for zenoh-dds-plugin
# - git
# - clang
RUN apt-get update && apt-get -y install g++ cmake libssl-dev openjdk-11-jdk-headless maven git clang
COPY . .
RUN cargo install --path .
###
### Run part
###
FROM debian:buster-slim
RUN apt-get update && apt-get install -y libssl1.1 && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/zenoh-bridge-dds /usr/local/bin/zenoh-bridge-dds
RUN ldconfig -v
RUN echo '#!/bin/bash' > /entrypoint.sh
RUN echo 'echo " * Starting: zenoh-bridge-dds $*"' >> /entrypoint.sh
RUN echo 'exec zenoh-bridge-dds $*' >> /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 7447/udp
EXPOSE 7447/tcp
ENV RUST_LOG info
ENTRYPOINT ["/entrypoint.sh"]