marcoh00 / docker-samba-ldap

A docker image for using samba with ldap
8 stars 4 forks source link

Issue in the Dockerfile #5

Open Nordes opened 4 years ago

Nordes commented 4 years ago

Hello, I didn't do a PR, but I might eventually.

When I tried to do the docker build, I got an error stating "E: Unable to correct problems, you have held broken packages.". This was due to the second line bellow

RUN apt-get update && \
    apt-get install --no-install-recommends --no-install-suggests -y samba=$SAMBA_VERSION smbldap-tools ldap-utils && \
    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y libnss-ldapd && \
    rm -rf /var/cache/apt && \
    rm -rf /etc/samba/smb.conf /var/lib/samba/private/secrets.tdb /etc/smbldap-tools /etc/nslcd.conf /etc/nsswitch.conf

The DEBIAN_FRONTEND also need to be on the second line, which will look like this:

RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y samba=$SAMBA_VERSION smbldap-tools ldap-utils && \
    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y libnss-ldapd && \
    rm -rf /var/cache/apt && \
    rm -rf /etc/samba/smb.conf /var/lib/samba/private/secrets.tdb /etc/smbldap-tools /etc/nslcd.conf /etc/nsswitch.conf

Once it's like this, the error goes away.