Runs Dockerized commands
Project description
docker-run-cmd
pip install run-docker-cmd
Run a self contained docker file representing an entry point. Useful for dockerizing utility functions.
Example dockerfile command:
# Use the official Python 3.10 Alpine-based image
FROM python:3.10-alpine
# Install yt-dlp dependencies and yt-dlp itself
# Adding necessary packages including ffmpeg
RUN apk add --no-cache \
ffmpeg \
dos2unix \
&& pip install --no-cache-dir yt-dlp ytdlp-brighteon
# Set the working directory in the container
WORKDIR /host_dir
# Build the entrypoint script in the container.
RUN echo '#!/bin/sh' > /entrypoint.sh && \
echo 'yt-dlp "$@"' >> /entrypoint.sh
# Make the entrypoint script executable
RUN chmod +x /entrypoint.sh
# Set the entrypoint to use /bin/sh
ENTRYPOINT ["sh", "/entrypoint.sh"]
Now save this as mydockerfile
Now run it:
run-docker-cmd mydockerfile
Docker commands
Self contained dockerfile's representing a command to be run. No external dependencies. The current working directory will be mapped into the container as /host_dir
Develope
To develop software, run . ./activate.sh
Windows
This environment requires you to use git-bash.
Linting
Run ./lint.sh to find linting errors using pylint, flake8 and mypy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docker-run-cmd-1.0.14.tar.gz.
File metadata
- Download URL: docker-run-cmd-1.0.14.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6b0730860a4329ad234deaa5389d824320bd92d13695833b4b7214061fae6ef
|
|
| MD5 |
ff8260b11b82a82148b54864cbdd9098
|
|
| BLAKE2b-256 |
b4f612dc5bd86ae81e5bb068995a163591adf8168a77203fd5e102c56259950c
|
File details
Details for the file docker_run_cmd-1.0.14-py2.py3-none-any.whl.
File metadata
- Download URL: docker_run_cmd-1.0.14-py2.py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61a5ce3ceaaf8049e80c59cf7f974e3e7c56c02b57e30a58af0a248df6edc62f
|
|
| MD5 |
79163ca64cad7add3120c8d7be5599c3
|
|
| BLAKE2b-256 |
a14360addb7206c47bd7e6a7f75b2a652fd08035e7fede8c3a7371fad4b1031a
|