This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added README, test build, pip package list, update system packages an…
…d upgrade base image to 1.0.1
- Loading branch information
1 parent
d0cc0d6
commit e60128a
Showing
6 changed files
with
130 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Docker Python Base Image | ||
|
||
![Maintenance](https://img.shields.io/maintenance/yes/2020?style=plastic) [![Drone Status](https://img.shields.io/drone/build/fabiodcorreia/docker-base-python?style=plastic)](https://cloud.drone.io/fabiodcorreia/docker-base-python) [![Latest Release](https://img.shields.io/github/v/release/fabiodcorreia/docker-base-python?style=plastic)](https://github.com/fabiodcorreia/docker-base-python/releases/latest) [![GitHub Licence](https://img.shields.io/github/license/fabiodcorreia/docker-base-python?style=plastic)](https://github.com/fabiodcorreia/docker-base-python/blob/master/LICENSE) | ||
|
||
|
||
![MicroBadger Layers](https://img.shields.io/microbadger/layers/fabiodcorreia/base-python?style=plastic) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/fabiodcorreia/base-python?style=plastic)](https://hub.docker.com/r/fabiodcorreia/base-python) [![Docker Pulls](https://img.shields.io/docker/pulls/fabiodcorreia/base-python?style=plastic)](https://hub.docker.com/r/fabiodcorreia/base-python) ![Docker Image Version (latest semver)](https://img.shields.io/docker/v/fabiodcorreia/base-python?sort=semver&style=plastic) | ||
|
||
A custom Python base image built with Alpine Linux. | ||
|
||
## Base Packages | ||
|
||
- python3 | ||
- pip3 | ||
- wheel | ||
|
||
## Versioning | ||
|
||
This image follows the [Semantic Versioning](https://semver.org/) pattern. | ||
|
||
- **MAJOR** version - Changes on Base Image version (1.0.0 to 2.0.0) | ||
- **MINOR** version - Changes on Python version (3.8.3 to 3.8.4) | ||
- **PATCH** version - Package updates and other non breaking changes on the image | ||
- **DRAFT** version - Unstable build for review (Optional) | ||
|
||
### Version Mapping | ||
|
||
| Version | 1.0 | 1.1 | 2.0 | | ||
| :----: | --- | --- | ---- | | ||
| Base Image | 1.x.x | 1.x.x | 2.x.x | | ||
| Python | 3.8.3 | 3.8.4 | 3.8.3 | | ||
|
||
When Base Image gets upgraded the major version is incremented, when Python gets upgraded the minor version is incremented. | ||
|
||
## Tags | ||
|
||
| Tag | Description | | ||
| :----: | --- | | ||
| latest | Latest version | | ||
| 1.0.0 | Specific patch version | | ||
| 1.0 | Specific minor version | | ||
| 1 | Specific major version | | ||
| 1.0.0-`arch` | Specific patch version to that `arch` | | ||
| 1.0-`arch` | Specific minor version to that `arch` | | ||
| 1-`arch` | Specific major version to that `arch` | | ||
| test | Branch version - **DO NOT USE** | | ||
|
||
The version tags are the same as the repository versioning tags but without the `v`. The `test` version is only for build purposes, it should not be pulled. | ||
|
||
The `arch` can be one of the supported architectures described below. | ||
|
||
## Supported Architectures | ||
|
||
| Architecture | Tag | | ||
| :----: | --- | | ||
| x86-64 | amd64 | | ||
| arm64 | arm64v8 | | ||
| armhf | arm32v7 | | ||
|
||
|
||
## Environment Variables | ||
|
||
| Name | Description | | ||
| :-----------------: | ----------- | | ||
| PUID | Set the UserID - [Details](https://github.com/fabiodcorreia/docker-base-alpine#userid--groupid) | | ||
| PGID | Set the GroupID - [Details](https://github.com/fabiodcorreia/docker-base-alpine#userid--groupid) | | ||
| TZ | Set the system timezone - [Options](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#!/bin/bash | ||
|
||
docker build . -t base-python | ||
docker run --rm --entrypoint '/bin/sh' -v ${PWD}:/tmp base-python -c '\ | ||
IMAGE_NAME="base-python" | ||
docker image rm ${IMAGE_NAME} | ||
docker build . -t ${IMAGE_NAME} | ||
docker run --rm --entrypoint '/bin/sh' -v ${PWD}:/tmp ${IMAGE_NAME} -c '\ | ||
apk info -v | sort > /tmp/package_versions.txt && \ | ||
echo "==== Pip Packages ====" >> /tmp/package_versions.txt && \ | ||
pip3 list --format freeze | sort >> /tmp/package_versions.txt && \ | ||
chmod 777 /tmp/package_versions.txt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
PYTHON=`python --version` | ||
PIP=`pip --version` | ||
|
||
if [ "$PYTHON" != "Python 3.8.3" ]; then | ||
echo "**** Python not found - $PYTHON ****" | ||
exit 1 | ||
fi | ||
|
||
if [ "$PIP" != "6.14.4" ]; then | ||
echo "**** PIP not found - $PIP ****" | ||
exit 1 | ||
fi |