Compare commits

...

4 Commits

4 changed files with 23 additions and 8 deletions

View File

@ -1,14 +1,18 @@
FROM alpine:latest
ARG DEBUG
ENV DEBUG=${DEBUG}
VOLUME /exports
WORKDIR /root
RUN mkdir -p /run/openrc
RUN touch /run/openrc/softlevel
RUN apk add --no-cache --update openrc
RUN apk add --no-cache --update --verbose alpine-conf tzdata bash krb5-server nfs-utils iproute2 krb5-server-openrc procps krb5 syslog-ng chrony
RUN apk add --no-cache --update --verbose tzdata bash krb5-server nfs-utils krb5-server-openrc krb5 syslog-ng chrony
RUN if [ -n "${DEBUG}" ]; then \
apk add --no-cache --update iproute2 procps \
fi
RUN rc-update add syslog-ng boot
RUN rc-update add krb5kdc default

View File

@ -1,10 +1,16 @@
FROM ubuntu:latest
ARG DEBUG
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBUG=${DEBUG}
WORKDIR /root
RUN apt-get update
RUN apt-get install -y nfs-kernel-server krb5-kdc krb5-admin-server nfs-common bash iproute2 iputils-ping net-tools
RUN apt-get install -y nfs-kernel-server krb5-kdc krb5-admin-server nfs-common bash
RUN if [ -n "${DEBUG}" ]; then \
apt-get install iproute2 iputils-ping net-tools \
fi
COPY ./entrypoint-ubuntu.sh .
COPY ./init.sh .

View File

@ -4,4 +4,8 @@ IMAGE=${IMAGE:-"thealmightydrawingtablet/nfs-krb"}
VERSION=$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname:short)' --count=1)
docker build --progress=plain -t "${IMAGE}:alpine" -t "${IMAGE}:${VERSION}-alpine" .
docker build --progress=plain -t "${IMAGE}:ubuntu" -t "${IMAGE}:${VERSION}-ubuntu" -f ./Dockerfile.ubuntu .
docker build --progress=plain -t "${IMAGE}:ubuntu" -t "${IMAGE}:${VERSION}-ubuntu" -f ./Dockerfile.ubuntu .
if [ "$1" == "push" ]; then
docker push --all-tags "${IMAGE}"
fi

View File

@ -18,6 +18,7 @@ DEFAULT_PERMITTED="*"
RW_MODE="rw"
UID=${NFS_UID:-0}
apk add --no-cache --update alpine-conf
setup-timezone -z "${SRV_TZ:-${DEFALUT_TIMEZONE}}"
apk del alpine-conf
cat > /etc/chrony/chrony.conf << 'EOF'
@ -41,9 +42,9 @@ fi
cat > /etc/krb5.conf << EOL
[logging]
default = FILE:/var/log/krb5libs.log:DEBUG
kdc = FILE:/var/log/krb5kdc.log:DEBUG
admin_server = FILE:/var/log/kadmind.log:DEBUG
default = SYSLOG:DEBUG
kdc = SYSLOG:DEBUG
admin_server = SYSLOG:DEBUG
[libdefaults]
dns_lookup_realm = false