Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container port cannot be modified #594

Open
golangav opened this issue Oct 9, 2021 · 4 comments
Open

Container port cannot be modified #594

golangav opened this issue Oct 9, 2021 · 4 comments

Comments

@golangav
Copy link

golangav commented Oct 9, 2021

Container port cannot be modified

I want motify 389 --> 8000, but not success。
What should I do?

--hostname ldap1.xx.com
-e LDAP_BASE_DN="dc=xx,dc=com"
-e LDAP_DOMAIN="xx.com"
-e LDAP_ORGANISATION="xx.com"
-e LDAP_ADMIN_PASSWORD='xxxxx'
-e LDAP_REPLICATION=true
-e LDAP_REPLICATION_HOSTS="#PYTHON2BASH:['ldap://ldap1.xx.com','ldap://ldap2.xx.com']"
-e ANOTHER_NODE_HOSTNAME='ldap2.xx.com'
-e ANOTHER_NODE_IP='192.168.1.2'
-e LDAP_TLS_VERIFY_CLIENT="never"
-e TZ=Asia/Shanghai
-p 8000:8000 \

@golangav golangav changed the title container port can not motify Container port cannot be modified Oct 9, 2021
@Anton-Kartashev
Copy link

Try -p 8000:389

@schapsl
Copy link

schapsl commented Oct 25, 2023

Allowing to change the internal port, would open up a new use case where you can use this image with podman in a rootless setup.
Which is exactly my constraint, sadly.

@nix-power
Copy link

nix-power commented Oct 25, 2023

Based on script that actually runs slapd inside the container: image/service/slapd/process.sh

HOST_PARAM="ldap://$FQDN:$LDAP_PORT ldaps://$FQDN:$LDAPS_PORT"
exec /usr/sbin/slapd -h "$HOST_PARAM ldapi:///" -u openldap -g openldap -d "$LDAP_LOG_LEVEL"

Just provide in a runtime the following ENV variables:
LDAP_PORT
LDAPS_PORT

@nix-power
Copy link

nix-power commented Oct 25, 2023

Occasionally these default values set in the following file:

image/environment/default.yaml

and could be overriden, of course, in a runtime

#This is the default image configuration file
#These values will persists in container environment.
#All environment variables used after the container first start
#must be defined here.
#more information : https://github.com/osixia/docker-light-baseimage

#General container configuration
#see table 5.1 in http://www.openldap.org/doc/admin24/slapdconf2.html for the available log levels.

LDAP_LOG_LEVEL: 256

#Ulimit
LDAP_NOFILE: 1024

#Do not perform any chown to fix file ownership
DISABLE_CHOWN: false

#Default port to bind slapd
LDAP_PORT: 389
LDAPS_PORT: 636

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

No branches or pull requests

4 participants