Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j-sephb-lt-n/python-docker-container
A basic python docker container (e.g. to use on GCP Compute Engine or AWS EC2)
https://github.com/j-sephb-lt-n/python-docker-container
docker google-cloud python
Last synced: about 22 hours ago
JSON representation
A basic python docker container (e.g. to use on GCP Compute Engine or AWS EC2)
- Host: GitHub
- URL: https://github.com/j-sephb-lt-n/python-docker-container
- Owner: J-sephB-lt-n
- License: gpl-3.0
- Created: 2023-11-29T08:51:40.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-05T10:30:42.000Z (7 months ago)
- Last Synced: 2024-04-17T22:57:31.375Z (7 months ago)
- Topics: docker, google-cloud, python
- Language: Dockerfile
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-docker-container
A basic python docker container (e.g. to use on GCP Compute Engine or AWS EC2).
Add the list of python packages which you wish to be installed in the container to [./requirements.txt](./requirements.txt).
You can build the container and deploy it to Google Cloud Platform as follows:
(it can then be used by Compute Engine, Cloud Run etc.)```bash
make build_push_container_to_google_artifact_registry \
GCP_PROJECT_ID="your google cloud project id here" \
GCP_REGION="e.g. europe-west2" \
GCP_ARTIFACT_REG_REPO_NAME="the name of the repository to save the image to on google cloud artifact registry" \
CONTAINER_NAME="choose whatever name you like for your container here"
```You can build and run the container locally like this:
```bash
docker build --tag python_dev .
docker run -it --name run_python_dev python_dev bash
docker stop run_python_dev
docker rm run_python_dev
```