-
Notifications
You must be signed in to change notification settings - Fork 5
Examples
Dimitrios Slamaris edited this page Oct 26, 2024
·
9 revisions
- ldapsearch documentation
ldap-spn: Find Account by SPN
SPN = serviceclass "/" hostname [":"port] ["/" servicename]
- arg1: service class
- Here is a list of recognized service classes
- arg2: hostname
ldapsearch -D dimi@dc.local -W -H ldap://dc.local:3268 "(servicePrincipalName={{.arg1}}/{{.arg2}})"get-image: Pull image from registry
The following block configures mdx so that it stops execution of code blocks, when one fails.
config:
on-error: failDownload docker image from hub.docker.com.
Run the following code block using mdx get-image.
docker pull alpinerun: Run command in a new container
This command defines da dependency: [run](get-image). get-image (see above). mdx run will first run get-image and then the code block below.
Create and run a new container from an image
-
-ti:--tty,--interactive
Note: -ti does not work with mdx, because we have no tty.
docker container run alpine sh -c "echo \"hello world!\""venv-shebang: Shebang support
#!/home/dim0x69/.venv/bin/python
import sys
print(sys.executable)
mdx venv-shebang will print out /home/dim0x69/.venv/bin/python