Repository navigation
Expand file tree
/
Copy pathContainerfile.dev
More file actions
79 lines (65 loc) · 3.63 KB
/
Copy pathContainerfile.dev
File metadata and controls
79 lines (65 loc) · 3.63 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM docker.io/library/node:22-bookworm-slim AS frontend
WORKDIR /frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci --no-audit --no-fund
COPY frontend/src ./src
COPY frontend/public ./public
COPY frontend/index.html frontend/tsconfig.json frontend/vite.config.ts ./
RUN npm run build
FROM docker.io/library/ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive \
TZ=Etc/UTC \
LANG=C.UTF-8 \
BOOST_HEADERS=/opt/boost-1.74/include/boost
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl gnupg && \
install -d -m 0755 /usr/share/keyrings && \
curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
-o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu noble main" \
> /etc/apt/sources.list.d/ros2.list && \
apt-get update && apt-get install -y --no-install-recommends \
autoconf automake bc binutils bison build-essential bzip2 ccache cmake \
cpio device-tree-compiler dosfstools e2fsprogs file flex gawk gettext \
git git-lfs libelf-dev libncurses-dev libssl-dev libtool libudev-dev \
libusb-1.0-0-dev libxml2-dev lz4 mtools ninja-build openssh-client \
patch pkg-config python3 python3-dev python3-pip python3-setuptools \
python3-venv python3-yaml rsync sshpass swig tar texinfo unzip wget \
xz-utils zip zlib1g-dev \
ros-jazzy-ros-base ros-jazzy-rmw-cyclonedds-cpp \
ros-dev-tools && \
rm -rf /var/lib/apt/lists/*
RUN curl -fsSL --retry 5 --retry-all-errors \
https://archive.ubuntu.com/ubuntu/pool/main/b/boost1.74/libboost1.74-dev_1.74.0-14ubuntu3_amd64.deb \
-o /tmp/libboost1.74-dev.deb && \
mkdir -p /opt/boost-1.74 && \
dpkg-deb --fsys-tarfile /tmp/libboost1.74-dev.deb | \
tar --no-same-owner --no-same-permissions --no-overwrite-dir \
-xf - -C /opt/boost-1.74 && \
mv /opt/boost-1.74/usr/include /opt/boost-1.74/include && \
rm -rf /opt/boost-1.74/usr /tmp/libboost1.74-dev.deb
ENV TIDE_CONFIGURATOR_VENV=/opt/tide_configurator/.venv \
TIDE_FRONTEND_DIST=/opt/tide_configurator/frontend/dist
# TideConfigurator uses Podman for the optional calibration environment.
RUN apt-get update && apt-get install -y --no-install-recommends podman && \
rm -rf /var/lib/apt/lists/*
COPY --from=frontend /usr/local/ /usr/local/
COPY requirements.txt /opt/tide_configurator/requirements.txt
COPY calibration/requirements.txt /opt/tide_configurator/calibration/requirements.txt
RUN python3 -m venv /opt/tide_configurator/.venv && \
/opt/tide_configurator/.venv/bin/pip install --no-cache-dir \
-r /opt/tide_configurator/requirements.txt
COPY --from=frontend /frontend/dist /opt/tide_configurator/frontend/dist
WORKDIR /workspace
CMD ["bash"]
# Rootless Podman-in-Podman needs VFS storage and no nested cgroup management.
RUN printf '[storage]\ndriver="vfs"\nrunroot="/run/containers/storage"\ngraphroot="/var/lib/containers/storage"\n' > /etc/containers/storage.conf && \
printf '[containers]\ncgroups="disabled"\n' > /etc/containers/containers.conf && \
ln -s /usr/bin/python3 /usr/local/bin/python
RUN apt-get update && apt-get install -y --no-install-recommends \
kmod libpcre3 python3-jinja2 python3-colorama python3-pycryptodome \
squashfs-tools && \
rm -rf /var/lib/apt/lists/*
LABEL org.opencontainers.image.source="https://github.com/HumpbackLab/tidesense" \
org.opencontainers.image.title="TideSense SDK development environment" \
org.opencontainers.image.description="Ubuntu 24.04 SDK, ROS 2, and TideConfigurator development tools"