summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorManuel Bentele2020-10-29 18:35:36 +0100
committerManuel Bentele2020-10-29 18:35:36 +0100
commitb51a07af249aa6f6e0b28a0433b1506e18d69219 (patch)
tree9abede217c8eb7f730dbd9d0292fde1f26506ef8 /pkg
parent[SERVER] Update nextSave timestamp at start of function (diff)
downloaddnbd3-b51a07af249aa6f6e0b28a0433b1506e18d69219.tar.gz
dnbd3-b51a07af249aa6f6e0b28a0433b1506e18d69219.tar.xz
dnbd3-b51a07af249aa6f6e0b28a0433b1506e18d69219.zip
[BUILD] add CMake support to build docker images based on Ubuntu 20.04
Diffstat (limited to 'pkg')
-rw-r--r--pkg/docker/Dockerfile28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkg/docker/Dockerfile b/pkg/docker/Dockerfile
new file mode 100644
index 0000000..ad2adcb
--- /dev/null
+++ b/pkg/docker/Dockerfile
@@ -0,0 +1,28 @@
+# use Ubuntu 20.04 as base image
+FROM ubuntu:focal
+
+# declare arguments that should be set by 'docker build --build-arg ...'
+ARG DNBD3_PACKAGE_FILE_NAME
+
+# copy built package file from host to docker image
+COPY ${DNBD3_PACKAGE_FILE_NAME} /tmp
+
+# install required dependencies
+RUN apt-get update
+RUN apt-get install -y libfuse2 libjansson4
+
+# install installation package
+RUN dpkg -i /tmp/${DNBD3_PACKAGE_FILE_NAME}
+
+# use default config for dnbd3-server
+RUN ln -s /etc/dnbd3-server/sample/server.conf /etc/dnbd3-server
+RUN ln -s /etc/dnbd3-server/sample/alt-servers /etc/dnbd3-server
+
+# make default storage point for dnbd3-server
+RUN mkdir -p /mnt/storage
+
+# expose the port of the dnbd3-server to the host
+EXPOSE 5003
+
+# run dnbd3-server
+CMD [ "dnbd3-server", "-n" ]