Borda / docker_sample

This Docker image a i basic image with accent on automatic pushing to Docker Hub.

Home Page:https://cloud.docker.com/u/borda/repository/docker/borda/docker_sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample Docker Image

Publish Docker Image Docker Pulls pre-commit.ci status

Building with CI/CD

This Docker image a basic image with accent on automatic pushing to Docker Hub.

  1. build Docker image in a CI/CD (for particular version)
  2. test the Image in CI/CD (for particular version)
  3. push the Image to Docker Hub (from master only and if credentials are given)

The reason is that DockerHub builds are using weak machines and the build time is very limited compare to GH Actions / CircleCI where you can use up to 5 hours.

Using Github Actions

Advantage of this build is usage of layer caching with sync with Docker Hub, so you build only the changed Docker layers...

The credentials (DOCKERHUB_USERNAME and DOCKER_PASSWORD) has to be set in Github setting - secrets.

Using CircleCI

It was dropped for some minor compatibility issues... to check it out pls see Git history.


Building locally

You can build it on your own, note it takes lots of time, be prepared.

git clone <git-repository>
cd docker_sample
docker image build -t ubuntu:py36 -f Dockerfile --build-arg PYTHON_VERSION=3.6 .

To run build image use following.

docker image list
docker run --rm -it ubuntu:py36 bash
docker image rm ubuntu:py36

Cleaning

In case you fail with some builds, you may need to clean your local storage.

docker image prune

or Docker - How to cleanup (unused) resources

docker images | grep "none"
docker rmi $(docker images | grep "none" | awk '/ / { print $3 }')

or remove all - Some way to clean up

docker rm -vf $(docker ps -aq)
docker rmi -f $(docker images -aq)
docker volume prune -f

About

This Docker image a i basic image with accent on automatic pushing to Docker Hub.

https://cloud.docker.com/u/borda/repository/docker/borda/docker_sample

License:MIT License


Languages

Language:Dockerfile 100.0%