summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/docker/archlinux_dockerfile28
-rw-r--r--pkg/docker/ubuntu-20-04_dockerfile (renamed from pkg/docker/Dockerfile)0
2 files changed, 28 insertions, 0 deletions
diff --git a/pkg/docker/archlinux_dockerfile b/pkg/docker/archlinux_dockerfile
new file mode 100644
index 0000000..ea6145b
--- /dev/null
+++ b/pkg/docker/archlinux_dockerfile
@@ -0,0 +1,28 @@
+# use Archlinux as base image
+FROM archlinux:latest
+
+# 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 pacman --noconfirm -Sy
+RUN pacman --noconfirm -S fuse2 jansson
+
+# install installation package
+RUN tar -xf /tmp/${DNBD3_PACKAGE_FILE_NAME} --strip-components=1 -C /
+
+# 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" ]
diff --git a/pkg/docker/Dockerfile b/pkg/docker/ubuntu-20-04_dockerfile
index ad2adcb..ad2adcb 100644
--- a/pkg/docker/Dockerfile
+++ b/pkg/docker/ubuntu-20-04_dockerfile