Skip to content

Commit e7666e1

Browse files
committed
updates to use a different base image since the previous only supported amd64
1 parent 92a4cdd commit e7666e1

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
UBUNTU_VERSION_LATEST="20.04"
2-
UBUNTU_VERSION_PREVIOUS="18.04"
1+
UBUNTU_VERSION_LATEST=20.04
2+
UBUNTU_VERSION_PREVIOUS=18.04

Dockerfile

+22-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ ARG MAINTAINER="Matthew Walter ([email protected])"
66
ARG UBUNTU_VERSION=20.04
77

88
# Base image
9-
FROM nvidia/opengl:1.0-glvnd-devel-ubuntu$UBUNTU_VERSION
9+
#FROM nvidia/opengl:1.0-glvnd-devel-ubuntu$UBUNTU_VERSION
10+
FROM ubuntu:$UBUNTU_VERSION
11+
12+
ARG TARGETPLATFORM
1013

1114
# Ubuntu version
1215
#ENV UBUNTU_DISTRIB_CODENAME "focal"
@@ -49,17 +52,31 @@ RUN echo 'net.core.rmem_default=10485760' >> /etc/sysctl.conf
4952
# set default LCM_VERSION
5053
ENV LCM_VERSION '1.5.0'
5154

55+
# On at least arm/v7, wget throws an error stating that
56+
# it can not verify github.com's certificate
57+
# RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
58+
# update-ca-certificates -f; \
59+
# fi
60+
61+
62+
# CMake is unable to find glib-2.0 libraries
63+
# using the LCM-provided cmake/FindGLib2.cmake
64+
#RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
65+
#ENV GLIB_PATH=/usr/lib/arm-linux-gnueabihf/
66+
#ENV Python_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.8.so
67+
# fi
68+
5269
# install LCM
5370
RUN \
5471
# pull lcm
5572
# Zip files are prepended with 'v'
5673
wget https://github.com/lcm-proj/lcm/archive/refs/tags/v$LCM_VERSION.zip && \
57-
# open up the source
74+
# open up the source
5875
unzip v$LCM_VERSION.zip && \
59-
# configure, build, install, and configure LCM
76+
# configure, build, install, and configure LCM
6077
cd lcm-$LCM_VERSION && mkdir build && cd build && cmake ../ && make install && ldconfig && \
61-
# delete source code
78+
# delete source code
6279
cd / && rm -rf v$LCM_VERSION.zip lcm-$LCM_VERSION
6380

6481
# configure pkgconfig to find LCM
65-
ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$LCM_INSTALL_DIR/pkgconfig
82+
ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$LCM_INSTALL_DIR/pkgconfig

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ include .env
1313
#UBUNTU_VERSION_PREVIOUS = "18.04"
1414

1515
# Base environments
16-
BASE_IMAGE_ENVIRONMENT_LATEST = "nvidia/opengl:1.0-glvnd-devel-ubuntu${UBUNTU_VERSION_LATEST}"
17-
BASE_IMAGE_ENVIRONMENT_PREVIOUS = "nvidia/opengl:1.0-glvnd-devel-ubuntu${UBUNTU_VERSION_PREVIOUS}"
16+
BASE_IMAGE_ENVIRONMENT_LATEST = ubuntu:${UBUNTU_VERSION_LATEST}#"nvidia/opengl:1.0-glvnd-devel-ubuntu${UBUNTU_VERSION_LATEST}
17+
BASE_IMAGE_ENVIRONMENT_PREVIOUS = ubuntu:${UBUNTU_VERSION_PREVIOUS}#"nvidia/opengl:1.0-glvnd-devel-ubuntu${UBUNTU_VERSION_PREVIOUS}"
1818

1919

2020
# Tag: latest
@@ -58,10 +58,10 @@ push: pre-push do-push post-push ## pushes the images to dockerhub
5858

5959
do-push:
6060
# Push lateset
61-
docker buildx build --build-arg="UBUNTU_VERSION=${UBUNTU_VERSION_LATEST}" --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --push --tag $(BUILD_IMAGE_LATEST) -f Dockerfile .
61+
docker buildx build --build-arg="UBUNTU_VERSION=${UBUNTU_VERSION_LATEST}" --platform linux/arm64/v8,linux/amd64 --push --tag $(BUILD_IMAGE_LATEST) -f Dockerfile .
6262

6363
# Push previous
64-
docker buildx build --build-arg="UBUNTU_VERSION=${UBUNTU_VERSION_PREVIOUS}" --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --push --tag $(BUILD_IMAGE_PREVIOUS) -f Dockerfile .
64+
docker buildx build --build-arg="UBUNTU_VERSION=${UBUNTU_VERSION_PREVIOUS}" --platform linux/arm64/v8,linux/amd64 --push --tag $(BUILD_IMAGE_PREVIOUS) -f Dockerfile .
6565

6666

6767
cleanup: ## Remove images pulled/generated as part of the build process

0 commit comments

Comments
 (0)