forked from kulmesa/communication_link
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (40 loc) · 1.44 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
# fog-sw BUILDER
FROM ros:foxy-ros-base as fog-sw-builder
ARG MODULE_PATH
ARG BUILD_NUMBER
ARG COMMIT_ID
ARG GIT_VER
# workaround for ROS GPG Key Expiration Incident
RUN rm /etc/apt/sources.list.d/ros2-latest.list && \
apt-get update && \
apt-get install -y curl && \
curl http://repo.ros2.org/repos.key | sudo apt-key add - && \
echo "deb http://packages.ros.org/ros2/ubuntu focal main" > /etc/apt/sources.list.d/ros2-latest.list && \
apt-get update
RUN echo "deb [trusted=yes] https://ssrc.jfrog.io/artifactory/ssrc-debian-public-remote focal fog-sw" >> /etc/apt/sources.list
# Install build dependencies
RUN apt-get update -y && apt-get install -y --no-install-recommends \
golang-1.16 \
build-essential \
cmake \
curl \
debhelper \
dh-make \
fakeroot \
gcc \
git-core \
make \
python3-bloom \
ros-foxy-px4-msgs=3.0.0-8~git20211015.85dfa24 \
ros-foxy-fog-msgs=0.0.6-28~git20210929.cac026d \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/usr/lib/go-1.16/bin/:${PATH}"
WORKDIR /build
COPY $MODULE_PATH .
RUN params="-m $(realpath .) " \
&& [ ! "${BUILD_NUMBER}" = "" ] && params="$params -b ${BUILD_NUMBER}" || : \
&& [ ! "${COMMIT_ID}" = "" ] && params="$params -c ${COMMIT_ID}" || : \
&& [ ! "${GIT_VER}" = "" ] && params="$params -g ${GIT_VER}" || : \
&& ./${PACKAGE_SUBDIR}/packaging/common/package.sh $params
FROM scratch
COPY --from=fog-sw-builder /*.deb /packages/