diff --git a/CHANGELOG.md b/CHANGELOG.md index 31219de..8a2288e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- [PR-14](https://github.com/AGH-CEAI/aegis_docker/pull/14) - Added first LABELs to store build arguments metadata. - [PR-13](https://github.com/AGH-CEAI/aegis_docker/pull/13) - Added compose for containers registry. - [PR-11](https://github.com/AGH-CEAI/aegis_docker/pull/11) - Added container for PPA server. - [PR-9](https://github.com/AGH-CEAI/aegis_docker/pull/9) - Added documentation for using toolbx containers in Ubuntu 22.04/24.04. diff --git a/Dockerfile b/Dockerfile index 654b3cc..2b7023b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,15 @@ ARG ROS_DISTRO=humble ARG PPA_HOSTNAME=geonosis +ARG AEGIS_ROS_TAG=${ROS_DISTRO}-devel FROM docker.io/osrf/ros:${ROS_DISTRO}-desktop ARG ROS_DISTRO ARG PPA_HOSTNAME +ARG AEGIS_ROS_TAG + +LABEL org.opencontainers.image.authors="ceai@agh.edu.pl" +LABEL aegis.ros.distro=${ROS_DISTRO} +LABEL aegis.ros.tag=${AEGIS_ROS_TAG} WORKDIR /ws @@ -16,7 +22,7 @@ RUN apt update \ ros-${ROS_DISTRO}-ros2-control \ ros-${ROS_DISTRO}-ros2-controllers \ # Setup workspace - && git clone -b ${ROS_DISTRO}-devel https://github.com/AGH-CEAI/aegis_ros.git src/aegis_ros \ + && git clone -b ${AEGIS_ROS_TAG} https://github.com/AGH-CEAI/aegis_ros.git src/aegis_ros \ && vcs import src < src/aegis_ros/aegis/aegis.repos \ # Install dependencies && rosdep update --rosdistro $ROS_DISTRO \ diff --git a/README.md b/README.md index 82f4eeb..48b6735 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,33 @@ echo "deb [trusted=yes] http://192.168.0.100/debian ./" | tee -a /etc/apt/source [Instructions how to use self-hosted container registry.](./utils/containers_registry/README.md) +#### Building & pushing a particular release tag +```bash +export REGISTRY_HOSTNAME=geonosis:5000 +export AEGIS_ROS_VERSION= +export AEGIS_CONTAINER_VERSION= + +# if the building is happening on the same machine as PPA server, add argument: +# --add-host $(hostname):$(hostname -I | awk '{print $1}') +podman build . -t ceai/aegis_dev:${AEGIS_CONTAINER_VERSION} --build-arg AEGIS_ROS_TAG=${AEGIS_ROS_VERSION} +podman tag ceai/aegis_dev:${AEGIS_CONTAINER_VERSION} ${REGISTRY_HOSTNAME}/ceai/aegis:${AEGIS_CONTAINER_VERSION} +podman image inspect --format='{{json .Config.Labels}}' ${REGISTRY_HOSTNAME}/ceai/aegis:${AEGIS_CONTAINER_VERSION} + +podman push ${REGISTRY_HOSTNAME}/ceai/aegis:${AEGIS_CONTAINER_VERSION} +``` + +#### Pulling & entering a particular release tag +```bash +export REGISTRY_HOSTNAME=geonosis:5000 +export AEGIS_CONTAINER_VERSION= + +podman pull ${REGISTRY_HOSTNAME}/ceai/aegis:${AEGIS_CONTAINER_VERSION} +podman image inspect --format='{{json .Config.Labels}}' ${REGISTRY_HOSTNAME}/ceai/aegis:${AEGIS_CONTAINER_VERSION} + +toolbox create --image ${REGISTRY_HOSTNAME}/ceai/aegis:${AEGIS_CONTAINER_VERSION} +toolbox enter aegis-${AEGIS_CONTAINER_VERSION} +``` + --- ### Known issues: