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

images: Go back to Fmstrat/samba-domain container #5580

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions images/scripts/services.setup
Original file line number Diff line number Diff line change
Expand Up @@ -66,37 +66,37 @@ poweroff
#
#############

cat <<EOF > /root/samba-ad.json
{
"samba-container-config": "v0",
"configs": {
"demo": {
"instance_features": ["addc"],
"domain_settings": "sink",
"instance_name": "f0"
}
},
"domain_settings": {
"sink": {
"realm": "COCKPIT.LAN",
"short_domain": "COCKPIT",
"admin_password": "foobarFoo123"
}
}
}
EOF

# See https://github.com/samba-in-kubernetes/samba-container#ad-dc
podman pull quay.io/samba.org/samba-ad-server
# See https://github.com/Fmstrat/samba-domain ; docker.io/nowsci/samba-domain works fine
# but we have to build ourselves due to docker pull rate limits
git clone --depth=1 https://github.com/Fmstrat/samba-domain /var/tmp/samba-domain
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we pin this at least?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't pin it in the past, and I'd actually like to get updates. We can pin it if/when it breaks, but I wouldn't like to do that in advance.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, approved! We pin it indirectly with a refresh so we are quite flexible in that regard.

# avoid pulling ubuntu base image from dockerhub
sed -i '/^FROM/ s|ubuntu:22.04|quay.io/bedrock/ubuntu:jammy|' /var/tmp/samba-domain/Dockerfile
podman build -t localhost/samba-domain /var/tmp/samba-domain

cat <<EOF > /root/run-samba-domain
# conflicts with samba's DNS
systemctl stop systemd-resolved
podman run -d -it --rm --name samba \
--privileged --network=host \
-v /root/samba-ad.json:/etc/samba/container.json \
podman run -d -it --rm --privileged --name samba \
-e "DOMAIN=COCKPIT.LAN" \
-e "DOMAINPASS=foobarFoo123" \
-e "DNSFORWARDER=172.27.0.3" \
-e "HOSTIP=$SERVER_IP" \
-p $SERVER_IP:53:53 \
-p $SERVER_IP:53:53/udp \
-p 88:88 \
-p 88:88/udp \
-p 135:135 \
-p 137-138:137-138/udp \
-p 139:139 \
-p 389:389 \
-p 389:389/udp \
-p 445:445 \
-p 464:464 \
-p 464:464/udp \
-p 636:636 \
-p 1024-1044:1024-1044 \
-p 3268-3269:3268-3269 \
--add-host services.cockpit.lan:$SERVER_IP \
-h f0.cockpit.lan \
quay.io/samba.org/samba-ad-server
localhost/samba-domain
EOF
chmod 755 /root/run-samba-domain

Expand Down
2 changes: 1 addition & 1 deletion images/services