summaryrefslogtreecommitdiffstats
path: root/pkg/docker/Dockerfile
blob: ad2adcbbe8808b37bcbc36a5fe843cf8a1e83797 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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" ]