Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tutorials/docker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ project(connext-tutorial-docker-pub-sub)

# Include Connext CMake utilities
list(APPEND CMAKE_MODULE_PATH
"/opt/rti.com/rticonnextdds-examples/resources/cmake/Modules/"
"/rticonnextdds-examples/resources/cmake/Modules/"
)
include(ConnextDdsConfigureCmakeUtils)
connextdds_configure_cmake_utils()
Expand Down
20 changes: 9 additions & 11 deletions tutorials/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
FROM rticom/connext-sdk:7.3.0-EAR as build-stage

# For armv8 uncomment the following line
# ENV CONNEXTDDS_ARCH=armv8Linux4gcc7.3.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to figure out the right CONNEXTDDS_ARCH based on the system's archicteure (for ex. with uname -m)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this on armv8, this comment was leftover from how the file was before. If everything else looks good, I'll test this part in the lab to see if setting CONNEXTDDS_ARCH is needed and if so, using uname -m or some other cpu command


FROM connext-sdk:latest as build-stage
WORKDIR /app

# Copy the necessary files to the container
COPY rti_license.dat ${NDDSHOME}
COPY CMakeLists.txt .
COPY home_automation.idl .
COPY *.cxx .
COPY *.xml .
COPY *.cxx ./
COPY *.xml ./

# Build the applications
RUN apt-get install -y cmake
RUN mkdir build
WORKDIR /app/build
RUN cmake ..
RUN cmake .. -DCONNEXTDDS_DIR=/opt/rti.com/rti_connext_dds-7.3.0/
RUN make -j4

# Copy the built applications to a new container
FROM rticom/connext-runtime:7.3.0-EAR as final-stage
FROM connext-sdk:latest as final-stage

WORKDIR /app
COPY --chown=rtiuser:rtigroup --from=build-stage ${NDDSHOME}/rti_license.dat ${NDDSHOME}
COPY --chown=rtiuser:rtigroup --from=build-stage /app/build/ /app
COPY *.xml /app
COPY --from=connext-sdk /opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat ./
COPY --from=build-stage /app/build/ ./
COPY *.xml ./
35 changes: 35 additions & 0 deletions tutorials/docker/connext.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:20.04 as build-stage

ARG RTI_LICENSE_AGREEMENT_ACCEPTED=false

# Install the required packages
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y \
build-essential \
cmake \
curl \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists

# Install prerequisites
RUN curl -sSL -o /usr/share/keyrings/rti-official-archive.gpg \
https://packages.rti.com/deb/official/repo.key
RUN printf -- "deb [arch=%s, signed-by=%s] %s %s main\n" \
$(dpkg --print-architecture) \
/usr/share/keyrings/rti-official-archive.gpg \
https://packages.rti.com/deb/official \
$(. /etc/os-release && echo ${VERSION_CODENAME}) | \
tee /etc/apt/sources.list.d/rti-official.list >/dev/null

# Install the RTI Connext Debian Package
RUN export DEBIAN_FRONTEND=noninteractive \
RTI_LICENSE_AGREEMENT_ACCEPTED=${RTI_LICENSE_AGREEMENT_ACCEPTED} \
&& apt-get update \
&& apt-get install -y rti-connext-dds-7.3.0 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists

COPY rti_license.dat /opt/rti.com/rti_connext_dds-7.3.0/
RUN git clone --recurse-submodule https://github.com/rticommunity/rticonnextdds-examples.git