summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2023-03-10 20:11:44 +0900
committerRyo Nakamura <upa@haeena.net>2023-03-10 20:11:44 +0900
commitb3b7299990a48d89acc04c746554f41daf310bd5 (patch)
tree4a7f04d5936344f7a18fa089bd7c9fc2caa31012 /docker
parentd766b3a99e1606629c5ce4a817c3fa9fd9b5c15c (diff)
parentca94d77e4544862e4c43cfddde69050bdc08fd35 (diff)
merge main into lib
Diffstat (limited to 'docker')
-rw-r--r--docker/alpine-3.17.Dockerfile35
1 files changed, 35 insertions, 0 deletions
diff --git a/docker/alpine-3.17.Dockerfile b/docker/alpine-3.17.Dockerfile
new file mode 100644
index 0000000..56c7ba9
--- /dev/null
+++ b/docker/alpine-3.17.Dockerfile
@@ -0,0 +1,35 @@
+FROM alpine:3.17
+
+# Build mscp with conan to create single binary mscp
+
+ARG mscpdir="/mscp"
+
+COPY . ${mscpdir}
+
+RUN apk add --no-cache \
+ gcc make cmake python3 py3-pip perl linux-headers libc-dev \
+ openssh bash python3-dev g++
+
+RUN pip3 install conan pytest numpy
+
+# Build mscp as a single binary
+RUN conan profile detect --force
+RUN cd ${mscpdir} \
+ && rm -rf build \
+ && conan install . --output-folder=build --build=missing \
+ && cd ${mscpdir}/build \
+ && cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake \
+ -DBUILD_STATIC=ON -DBUILD_CONAN=ON \
+ && make \
+ && cp mscp /usr/bin/ \
+ && cp mscp /mscp/build/mscp_0.0.6-alpine-3.17-x86_64.static
+
+# copy mscp to PKG FILE NAME because this build doesn't use CPACK
+
+# preparation for sshd
+RUN ssh-keygen -A
+RUN mkdir /var/run/sshd \
+ && ssh-keygen -f /root/.ssh/id_rsa -N "" \
+ && mv /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys