File: docker_run.sh

package info (click to toggle)
microsoft-authentication-library-for-python 1.34.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,320 kB
  • sloc: python: 8,613; xml: 2,783; sh: 27; makefile: 19
file content (24 lines) | stat: -rwxr-xr-x 741 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/bash

# Error out if there is less than 1 argument
if [ "$#" -lt 1 ]; then
    echo "Usage: $0 <Python_image> [command]"
    echo "Example: $0 python:3.14.0a2-slim bash"
    exit 1
fi

# We will get a standard Python image from the input,
# so that we don't need to hard code one in a Dockerfile
IMAGE_NAME=$1

echo "=== Starting $IMAGE_NAME (especially those which have no AppImage yet) ==="
echo "After seeing the bash prompt, run the following to test:"
echo "    apt update && apt install -y gcc libffi-dev  # Needed in Python 3.14.0a2-slim"
echo "    pip install -e ."
echo "    pytest --capture=no -s tests/chosen_test_file.py"
docker run --rm -it \
    --privileged \
    -w /home -v $PWD:/home \
    $IMAGE_NAME \
    $2