Archived
Rework Dockerfile to use phusion/baseimage
This commit is contained in:
1 parent
1f7ef03f03
commit
955a6223ae
2 files changed
+20
-14
No files matched your search
+20
-14
@@ -1,26 +1,32 @@
|
||||
from ubuntu:12.04
|
||||
FROM phusion/baseimage:0.9.8
|
||||
|
||||
ENV HOME /root
|
||||
|
||||
# Disable SSH
|
||||
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
|
||||
|
||||
# Use baseimage-docker's init system.
|
||||
CMD ["/sbin/my_init"]
|
||||
|
||||
# Configure apt
|
||||
run echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
|
||||
run apt-get -y update
|
||||
|
||||
# Don't start slapd on install
|
||||
run echo "#!/bin/sh\nexit 101" >/usr/sbin/policy-rc.d
|
||||
run chmod +x /usr/sbin/policy-rc.d
|
||||
RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
|
||||
RUN apt-get -y update
|
||||
|
||||
# Install slapd
|
||||
run LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y slapd
|
||||
RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y slapd
|
||||
|
||||
# Default configuration: can be overridden at the docker command line
|
||||
env LDAP_ROOTPASS toor
|
||||
env LDAP_ORGANISATION Acme Widgets Inc.
|
||||
env LDAP_DOMAIN example.com
|
||||
ENV LDAP_ROOTPASS toor
|
||||
ENV LDAP_ORGANISATION Acme Widgets Inc.
|
||||
ENV LDAP_DOMAIN example.com
|
||||
|
||||
expose 389
|
||||
EXPOSE 389
|
||||
|
||||
add ./slapd-start /usr/bin/slapd-start
|
||||
cmd ["/usr/bin/slapd-start"]
|
||||
RUN mkdir /etc/service/slapd
|
||||
ADD slapd.sh /etc/service/slapd/run
|
||||
|
||||
# To store the data outside the container, mount /var/lib/ldap as a data volume
|
||||
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# vim:ts=8:noet:
|
||||
File renamed without changes.
Reference in new issue
Block a user