From a0194cf8ebdac0fe753084fdd3cad7b34dfe96d3 Mon Sep 17 00:00:00 2001 From: AssemblyJohn Date: Mon, 3 Jun 2024 10:47:11 +0300 Subject: [PATCH 1/4] Added ubuntu 22 docker Signed-off-by: AssemblyJohn --- .../.devcontainer.json | 32 ++++++++ .../Dockerfile | 76 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 docker/everest-playground-ubuntu-22-04/.devcontainer.json create mode 100644 docker/everest-playground-ubuntu-22-04/Dockerfile diff --git a/docker/everest-playground-ubuntu-22-04/.devcontainer.json b/docker/everest-playground-ubuntu-22-04/.devcontainer.json new file mode 100644 index 00000000..0c302b51 --- /dev/null +++ b/docker/everest-playground-ubuntu-22-04/.devcontainer.json @@ -0,0 +1,32 @@ +{ + "name": "EVerest playground Ubuntu 22.04", + "build": { + "dockerfile": "Dockerfile" + }, + "containerEnv": { + "MQTT_SERVER_ADDRESS": "mqtt-server", + "MQTT_SERVER_PORT": "1883" + }, + "extensions": [ + "ms-python.python", + "ms-vscode.cpptools", + "twxs.cmake", + "ms-vscode.cmake-tools" + ], + "postCreateCommand": "", + "remoteUser": "docker", + "runArgs": [ + "--network=infranet_network" + ], + "workspaceFolder": "/workspace/everest-cpp", + "workspaceMount": "source=${localWorkspaceFolder}/../../,target=/workspace,type=bind", + "settings": { + "terminal.integrated.profiles.linux": { + "bash": { + "path": "/bin/bash" + } + }, + "terminal.integrated.defaultProfile.linux": "bash", + "python.pythonPath": "/usr/bin/python3" + } +} diff --git a/docker/everest-playground-ubuntu-22-04/Dockerfile b/docker/everest-playground-ubuntu-22-04/Dockerfile new file mode 100644 index 00000000..288524d5 --- /dev/null +++ b/docker/everest-playground-ubuntu-22-04/Dockerfile @@ -0,0 +1,76 @@ +ARG BASE_IMAGE=ubuntu +ARG BASE_IMAGE_VERSION=22.04 +FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION} + +ARG USERNAME=docker +ARG USER_UID=1000 + +# configure timezone data +ENV TIMEZONE=Europe/Berlin +RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone + +# create user and add to sudoers +RUN useradd -ms /bin/bash -u ${USER_UID} -U ${USERNAME} + +RUN apt-get update \ + && apt-get install --no-install-recommends -y sudo \ + && echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} \ + && chmod 0440 /etc/sudoers.d/${USERNAME} \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + git \ + rsync \ + wget \ + cmake \ + doxygen \ + graphviz \ + build-essential \ + clang-format \ + clang-tidy \ + cppcheck \ + libboost-all-dev \ + maven \ + openjdk-11-jdk \ + libsqlite3-dev \ + python3-pip \ + libssl-dev \ + gpg \ + libcurl4-openssl-dev \ + pkg-config \ + libpcap-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# install a modern version of Node.js +ENV NODE_VERSION=node_16.x +ENV KEYRING=/usr/share/keyrings/nodesource.gpg +RUN wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee "${KEYRING}" >/dev/null +RUN gpg --no-default-keyring --keyring "${KEYRING}" --list-keys 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280 +RUN echo "deb [signed-by=${KEYRING}] https://deb.nodesource.com/${NODE_VERSION} focal main" | tee /etc/apt/sources.list.d/nodesource.list +RUN echo "deb-src [signed-by=${KEYRING}] https://deb.nodesource.com/${NODE_VERSION} focal main" | tee -a /etc/apt/sources.list.d/nodesource.list +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + nodejs \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# create workdir and set access rights +WORKDIR /workspace/everest-cpp +RUN chown -R ${USERNAME}:${USERNAME} /workspace/everest-cpp + +USER ${USERNAME} + +# add github to known hosts +RUN mkdir ~/.ssh +RUN ssh-keyscan github.com > ~/.ssh/known_hosts + +ENV PATH="/home/$USERNAME/.local/bin:$PATH" +ENV CPM_SOURCE_CACHE="/home/$USERNAME/cpm_source_cache" + +RUN echo "echo \"To initialize the EVerest workspace please run the following command:\"" >> /home/${USERNAME}/.bashrc +RUN echo "echo \". init.sh\"" >> /home/${USERNAME}/.bashrc + +CMD [ "bash" ] From 1e421271f088a69efd19a5aadea82423a811fab1 Mon Sep 17 00:00:00 2001 From: AssemblyJohn Date: Mon, 3 Jun 2024 10:48:26 +0300 Subject: [PATCH 2/4] Removed Ubununtu 20 support Signed-off-by: AssemblyJohn --- .../.devcontainer.json | 32 -------- .../Dockerfile | 76 ------------------- 2 files changed, 108 deletions(-) delete mode 100644 docker/everest-playground-ubuntu-20-04/.devcontainer.json delete mode 100644 docker/everest-playground-ubuntu-20-04/Dockerfile diff --git a/docker/everest-playground-ubuntu-20-04/.devcontainer.json b/docker/everest-playground-ubuntu-20-04/.devcontainer.json deleted file mode 100644 index 93025435..00000000 --- a/docker/everest-playground-ubuntu-20-04/.devcontainer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "EVerest playground Ubuntu 20.04", - "build": { - "dockerfile": "Dockerfile" - }, - "containerEnv": { - "MQTT_SERVER_ADDRESS": "mqtt-server", - "MQTT_SERVER_PORT": "1883" - }, - "extensions": [ - "ms-python.python", - "ms-vscode.cpptools", - "twxs.cmake", - "ms-vscode.cmake-tools" - ], - "postCreateCommand": "", - "remoteUser": "docker", - "runArgs": [ - "--network=infranet_network" - ], - "workspaceFolder": "/workspace/everest-cpp", - "workspaceMount": "source=${localWorkspaceFolder}/../../,target=/workspace,type=bind", - "settings": { - "terminal.integrated.profiles.linux": { - "bash": { - "path": "/bin/bash" - } - }, - "terminal.integrated.defaultProfile.linux": "bash", - "python.pythonPath": "/usr/bin/python3" - } -} diff --git a/docker/everest-playground-ubuntu-20-04/Dockerfile b/docker/everest-playground-ubuntu-20-04/Dockerfile deleted file mode 100644 index 62d2e519..00000000 --- a/docker/everest-playground-ubuntu-20-04/Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -ARG BASE_IMAGE=ubuntu -ARG BASE_IMAGE_VERSION=20.04 -FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION} - -ARG USERNAME=docker -ARG USER_UID=1000 - -# configure timezone data -ENV TIMEZONE=Europe/Berlin -RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone - -# create user and add to sudoers -RUN useradd -ms /bin/bash -u ${USER_UID} -U ${USERNAME} - -RUN apt-get update \ - && apt-get install --no-install-recommends -y sudo \ - && echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME} \ - && chmod 0440 /etc/sudoers.d/${USERNAME} \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - git \ - rsync \ - wget \ - cmake \ - doxygen \ - graphviz \ - build-essential \ - clang-format \ - clang-tidy \ - cppcheck \ - libboost-all-dev \ - maven \ - openjdk-11-jdk \ - libsqlite3-dev \ - python3-pip \ - libssl-dev \ - gpg \ - libcurl4-openssl-dev \ - pkg-config \ - libpcap-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# install a modern version of Node.js -ENV NODE_VERSION=node_16.x -ENV KEYRING=/usr/share/keyrings/nodesource.gpg -RUN wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee "${KEYRING}" >/dev/null -RUN gpg --no-default-keyring --keyring "${KEYRING}" --list-keys 9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280 -RUN echo "deb [signed-by=${KEYRING}] https://deb.nodesource.com/${NODE_VERSION} focal main" | tee /etc/apt/sources.list.d/nodesource.list -RUN echo "deb-src [signed-by=${KEYRING}] https://deb.nodesource.com/${NODE_VERSION} focal main" | tee -a /etc/apt/sources.list.d/nodesource.list -RUN apt-get update \ - && apt-get install --no-install-recommends -y \ - nodejs \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# create workdir and set access rights -WORKDIR /workspace/everest-cpp -RUN chown -R ${USERNAME}:${USERNAME} /workspace/everest-cpp - -USER ${USERNAME} - -# add github to known hosts -RUN mkdir ~/.ssh -RUN ssh-keyscan github.com > ~/.ssh/known_hosts - -ENV PATH="/home/$USERNAME/.local/bin:$PATH" -ENV CPM_SOURCE_CACHE="/home/$USERNAME/cpm_source_cache" - -RUN echo "echo \"To initialize the EVerest workspace please run the following command:\"" >> /home/${USERNAME}/.bashrc -RUN echo "echo \". init.sh\"" >> /home/${USERNAME}/.bashrc - -CMD [ "bash" ] From 7ff87f28d11cb96b265970224771ccc60b41fa8f Mon Sep 17 00:00:00 2001 From: AssemblyJohn Date: Mon, 3 Jun 2024 10:52:01 +0300 Subject: [PATCH 3/4] Bumped debian version to 12 Signed-off-by: AssemblyJohn --- docker/everest-playground/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/everest-playground/Dockerfile b/docker/everest-playground/Dockerfile index 92ba2e79..16d64439 100644 --- a/docker/everest-playground/Dockerfile +++ b/docker/everest-playground/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=debian:11 +ARG BASE_IMAGE=debian:12 FROM ${BASE_IMAGE} ARG BASE_IMAGE From d778fafe479ab09aa9eb53589f20293bba20814d Mon Sep 17 00:00:00 2001 From: AssemblyJohn Date: Mon, 3 Jun 2024 11:04:18 +0300 Subject: [PATCH 4/4] Updated versions Signed-off-by: AssemblyJohn --- docker/everest-playground-ubuntu-22-04/Dockerfile | 2 +- docker/everest-playground/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/everest-playground-ubuntu-22-04/Dockerfile b/docker/everest-playground-ubuntu-22-04/Dockerfile index 288524d5..54a435e9 100644 --- a/docker/everest-playground-ubuntu-22-04/Dockerfile +++ b/docker/everest-playground-ubuntu-22-04/Dockerfile @@ -33,7 +33,7 @@ RUN apt-get update \ cppcheck \ libboost-all-dev \ maven \ - openjdk-11-jdk \ + openjdk-17-jdk \ libsqlite3-dev \ python3-pip \ libssl-dev \ diff --git a/docker/everest-playground/Dockerfile b/docker/everest-playground/Dockerfile index 16d64439..6b6c37be 100644 --- a/docker/everest-playground/Dockerfile +++ b/docker/everest-playground/Dockerfile @@ -35,7 +35,7 @@ RUN apt-get update \ cppcheck \ libboost-all-dev \ maven \ - openjdk-11-jdk \ + openjdk-17-jdk \ nodejs \ npm \ libsqlite3-dev \