diff options
author | Ryo Nakamura <upa@haeena.net> | 2024-04-11 10:34:22 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2024-04-11 10:34:22 +0900 |
commit | d44a670b49e5e41cace9c2f78321a35e9cb3a7dc (patch) | |
tree | 20b61fd2bbe655cbe4c0963c405e53546532c9d1 /Dockerfile | |
parent | a281dfd9e92565430a140d9ee0987f6911ff0f02 (diff) |
add test on ubuntu 24.04
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile/ubuntu-24.04.Dockerfile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Dockerfile/ubuntu-24.04.Dockerfile b/Dockerfile/ubuntu-24.04.Dockerfile new file mode 100644 index 0000000..419afb0 --- /dev/null +++ b/Dockerfile/ubuntu-24.04.Dockerfile @@ -0,0 +1,37 @@ +FROM ubuntu:24.04 + +ARG REQUIREDPKGS + +ARG DEBIAN_FRONTEND=noninteractive +RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \ + ${REQUIREDPKGS} ca-certificates openssh-server \ + python3 python3-pip python3-dev python3-pytest + + +# preparation for sshd +RUN mkdir /var/run/sshd \ + && ssh-keygen -A \ + && ssh-keygen -f /root/.ssh/id_rsa -N "" \ + && cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys + +# create test user +RUN useradd -m -d /home/test test \ + && echo "test:userpassword" | chpasswd \ + && mkdir -p /home/test/.ssh \ + && ssh-keygen -f /home/test/.ssh/id_rsa_test -N "keypassphrase" \ + && cat /home/test/.ssh/id_rsa_test.pub >> /home/test/.ssh/authorized_keys \ + && chown -R test:test /home/test \ + && chown -R test:test /home/test/.ssh + + +ARG mscpdir="/mscp" + +COPY . ${mscpdir} + +# build +RUN cd ${mscpdir} \ + && rm -rf build \ + && cmake -B build \ + && cd ${mscpdir}/build \ + && make -j 2 \ + && make install |