Skip to content

Conversation

tetsuyainfra
Copy link

Because "set -e option in entrypoint.sh"
if env | grep SLAPD_ (don't set SLAPD_* env) returned an error, shell script stops.

// Reproduce commands
docker volume create --name etc_ldap
docker volume create --name var_ldap

// 1st execution 
docker run -d \
  -e SLAPD_PASSWORD=mysecretpassword  \
  -e SLAPD_DOMAIN=ldap.example.org    \
  -v etc_ldap:/etc/ldap               \
  -v var_ldap:/var/lib/ldap           \
  dinkel/openldap

// 2nd execution ends immediately
docker run -d \
  -v etc_ldap:/etc/ldap               \
  -v var_ldap:/var/lib/ldap           \
  dinkel/openldap
// OR 
docker run -it \
  -v etc_ldap:/etc/ldap               \
  -v var_ldap:/var/lib/ldap           \
  dinkel/openldap

@bersace
Copy link

bersace commented Jun 23, 2017

Why not use bashism ? :)

$ echo ${!SSH_*}
SSH_AGENT_PID SSH_AUTH_SOCK

fedde-s added a commit to fedde-s/docker-openldap that referenced this pull request Sep 22, 2017
ignore set -e at grep SLAPD_

Because "set -e option in entrypoint.sh"
if `env | grep SLAPD_` (don't set SLAPD_* env) returned an error, shell
script stops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants