FROM ubuntu:noble

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Moscow

RUN \
	apt update && \
	apt install -y --no-install-recommends apt-utils && \
	apt install -y --no-install-recommends tzdata \
	ca-certificates \
	build-essential \
	tini && \
	apt install -y --no-install-recommends \
	dnsutils \
	net-tools \
	nano \
	glusterfs-server \
	glusterfs-client \
	glusterfs-cli \
	glusterfs-common \
	fuse3 \
	libfuse3-3 \
	attr \
	xattr && \
	dpkg-reconfigure -f noninteractive tzdata && \
	apt autoremove --purge -y && \
	apt clean -y && \
	rm -rf /tmp/*

ADD glusterfs-master.sh /docker/glusterfs-master.sh
ADD glusterfs-node.sh /docker/glusterfs-node.sh

EXPOSE 111 111/udp 24007 24009 49152
STOPSIGNAL SIGINT
ENTRYPOINT ["tini", "--"]
