From 7307e39ff6203d66024b552995f8028b88e772d2 Mon Sep 17 00:00:00 2001 From: ansgarz Date: Fri, 24 May 2024 11:34:45 +0200 Subject: [PATCH] update images for integration tests to ubuntu 22.04 --- Dockerfile | 13 +++++++++++++ .../core/docker/dockerimages/DockerImages.kt | 4 ++-- .../framework/core/platformTest/UbuntuProvTest.kt | 4 ++-- 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fc166f1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +# image for usage in ci pipeline +FROM ubuntu:22.04 + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get -y install apt-utils sudo + +RUN useradd -m testuser && echo "testuser:testuserpw" | chpasswd && usermod -aG sudo testuser +RUN echo "testuser ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/testuser + +USER testuser +CMD /bin/bash +WORKDIR /home/testuser diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/docker/dockerimages/DockerImages.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/docker/dockerimages/DockerImages.kt index 94c69a2..1a62a1b 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/docker/dockerimages/DockerImages.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/core/docker/dockerimages/DockerImages.kt @@ -21,8 +21,8 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get -y install adduser sudo -RUN useradd -m $userName && echo "$userName:$userName" | chpasswd && adduser $userName sudo +RUN apt-get update && apt-get -y install sudo +RUN useradd -m $userName && echo "$userName:$userName" | chpasswd && usermod -aG sudo $userName RUN echo "$userName ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$userName USER $userName diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/core/platformTest/UbuntuProvTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/core/platformTest/UbuntuProvTest.kt index 0ce8d9c..7128485 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/core/platformTest/UbuntuProvTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/core/platformTest/UbuntuProvTest.kt @@ -124,8 +124,8 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get -y install adduser sudo -RUN useradd -m $userName && echo "$userName:$userName" | chpasswd && adduser $userName sudo +RUN apt-get update && apt-get -y install sudo +RUN useradd -m $userName && echo "$userName:$userName" | chpasswd && usermod -aG sudo $userName USER $userName CMD /bin/bash