Skip to main content

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.

Linting

MacOS_Tests Ubuntu_Tests Win_Tests

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docker-run-cmd-1.0.14.tar.gz (14.7 kB view hashes)

Uploaded Source

Built Distribution

docker_run_cmd-1.0.14-py2.py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page