Skip to content

Commit

Permalink
2.4.0 - Feat: update base and slim images like in CE (#9)
Browse files Browse the repository at this point in the history
* change bases

* more fixes

* fix docker registry

* Update Dockerfile

* update base images

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 1c7fcac commit 5643fb1
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 239 deletions.
2 changes: 1 addition & 1 deletion ce/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Dockerfile is used to build an rviz image based on Ubuntu
ARG DOCKER_REGISTRY="pubregistry.aws.cloud.mov.ai"
FROM ${DOCKER_REGISTRY}/ce/movai-base-focal:v1.4.11
FROM ${DOCKER_REGISTRY}/ce/movai-base-focal:v2.4.0

LABEL description="MOV.AI Graphical Tools"
LABEL maintainer="devops@mov.ai"
Expand Down
4 changes: 1 addition & 3 deletions files/bin/rviz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
# File: rviz.sh
set -e

source "/opt/ros/${ROS_DISTRO}/setup.bash"

ROS_MASTER_URI="http://${ROS_MASTER}:${ROS_MASTER_PORT}" "/opt/ros/${ROS_DISTRO}/bin/rviz"
ROS_MASTER_URI="http://${ROS_MASTER}:${ROS_MASTER_PORT}" "/usr/bin/rviz"
9 changes: 7 additions & 2 deletions files/common/install/ros-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
### every exit != 0 fails the script
set -e

echo "Install IceWM UI components"
echo "Setup ROS-Tools repo"
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

echo "Install ROS-Tools components"
apt-get update
apt-get install -y terminator
apt-get install --no-install-recommends -y rviz \
"ros-$ROS_DISTRO-rqt" "ros-$ROS_DISTRO-rqt-common-plugins"
apt-get clean -y
26 changes: 0 additions & 26 deletions files/deploy.sh

This file was deleted.

37 changes: 0 additions & 37 deletions files/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,5 @@ ln -sf /proc/1/fd/1 ${APP_LOGS}/stdout

[ -f ${MOVAI_HOME}/.welcome ] && cat ${MOVAI_HOME}/.welcome

# Code from https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash

function compare_version() {

if [ "${1}" == "${2}" ]; then
return 0
fi

local IFS=.
local i ver1=(${1}) ver2=(${2})
# fill empty fields in ver1 with zeros
for ((i = ${#ver1[@]}; i < ${#ver2[@]}; i++)); do
ver1[i]=0
done

for ((i = 0; i < ${#ver1[@]}; i++)); do
if [[ -z ${ver2[i]} ]]; then
# fill empty fields in ver2 with zeros
ver2[i]=0
fi
if ((10#${ver1[i]} > 10#${ver2[i]})); then
return 1
fi
if ((10#${ver1[i]} < 10#${ver2[i]})); then
return 2
fi
done

return 0
}

# If we have updates on our update folder we do the update
if [ $(ls ${APP_UPDATES}/movai-*_latest_*.deb 2>/dev/null) ]; then
# Run the update procedure and exit if everything goes well
update.sh && exit
fi

# Run command
exec /usr/local/bin/movai-entrypoint.sh ${@}
4 changes: 3 additions & 1 deletion files/home/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ if [ "$TERM" != "linux" ] && [ -f "/usr/local/bin/powerline-go" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

source "/opt/ros/$ROS_DISTRO/setup.bash"
if [ -f /opt/ros/${ROS_DISTRO}/setup.bash ]; then
source "/opt/ros/$ROS_DISTRO/setup.bash"
fi

export ROS_MASTER_URI="http://${ROS_MASTER}:${ROS_MASTER_PORT}"
56 changes: 0 additions & 56 deletions files/install-packages.sh

This file was deleted.

4 changes: 2 additions & 2 deletions files/ubuntu/install/icewm_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

echo "Install IceWM UI components"
apt-get update
apt-get install -y supervisor icewm xterm xfonts-base xauth xinit
apt-get update
apt-get install --no-install-recommends -y supervisor icewm xterm xfonts-base xauth xinit
apt-get purge -y pm-utils xscreensaver*
apt-get clean -y
2 changes: 1 addition & 1 deletion files/ubuntu/install/install_custom_fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -e

echo "Installing ttf-wqy-zenhei"
apt-get install -y ttf-wqy-zenhei
apt-get install --no-install-recommends -y ttf-wqy-zenhei
10 changes: 6 additions & 4 deletions files/ubuntu/install/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
set -e

echo "Install some common tools for further installation"
apt-get update
apt-get install -y vim wget net-tools locales bzip2 \
apt-get update
apt-get install --no-install-recommends -y terminator vim wget net-tools locales bzip2 \
python-numpy #used for websockify/novnc
apt-get clean -y

echo "generate locales für en_US.UTF-8"
locale-gen en_US.UTF-8
echo "generate locales for $LANG"
locale-gen "$LANG"
dpkg-reconfigure locales

94 changes: 0 additions & 94 deletions files/update.sh

This file was deleted.

10 changes: 4 additions & 6 deletions melodic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Dockerfile is used to build an headless vnc image based on Ubuntu

FROM osrf/ros:melodic-desktop-full
ARG DOCKER_REGISTRY="registry.cloud.mov.ai"
FROM ${DOCKER_REGISTRY}/devops/movai-base-bionic:v2.4.0

LABEL description="MOV.AI Graphical Tools"
LABEL maintainer="devops@mov.ai"
Expand Down Expand Up @@ -31,7 +31,8 @@ ENV DISPLAY=:1 \
VNC_VIEW_ONLY=false \
ROS_VERSION=${ROS_VERSION} \
ROS_MASTER=${ROS_MASTER} \
ROS_MASTER_PORT=${ROS_MASTER_PORT}
ROS_MASTER_PORT=${ROS_MASTER_PORT} \
ROS_DISTRO=melodic

### Environment config
ENV HOME=${USER_HOME} \
Expand All @@ -44,9 +45,6 @@ ENV HOME=${USER_HOME} \
### ROS Config
ENV ROS_MASTER_URI="http://${ROS_MASTER}:${ROS_MASTER_PORT}"

RUN adduser --uid ${USER_ID} --home ${HOME} --disabled-password --gecos '' ${USER_NAME} && \
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key "${ROS_GPG_KEY}"

WORKDIR ${HOME}

### Add all install scripts for further steps
Expand Down
10 changes: 4 additions & 6 deletions noetic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Dockerfile is used to build an headless vnc image based on Ubuntu

FROM osrf/ros:noetic-desktop-full
ARG DOCKER_REGISTRY="registry.cloud.mov.ai"
FROM ${DOCKER_REGISTRY}/devops/movai-base-focal:v2.4.0

LABEL description="MOV.AI Graphical Tools"
LABEL maintainer="devops@mov.ai"
Expand Down Expand Up @@ -31,7 +31,8 @@ ENV DISPLAY=:1 \
VNC_VIEW_ONLY=false \
ROS_VERSION=${ROS_VERSION} \
ROS_MASTER=${ROS_MASTER} \
ROS_MASTER_PORT=${ROS_MASTER_PORT}
ROS_MASTER_PORT=${ROS_MASTER_PORT} \
ROS_DISTRO=noetic

### Environment config
ENV HOME=${USER_HOME} \
Expand All @@ -44,9 +45,6 @@ ENV HOME=${USER_HOME} \
### ROS Config
ENV ROS_MASTER_URI="http://${ROS_MASTER}:${ROS_MASTER_PORT}"

RUN adduser --uid ${USER_ID} --home ${HOME} --disabled-password --gecos '' ${USER_NAME} && \
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key "${ROS_GPG_KEY}"

WORKDIR ${HOME}

### Add all install scripts for further steps
Expand Down

0 comments on commit 5643fb1

Please sign in to comment.