sortapp/README.md

1.2 KiB

#SortAPP

SortApp is simple example that sort a file in input. Starting from this example, you can first create an installable package via pip3 and then a docker image in which it is installed the created package. The package declares the sortapp command as entrypoint. So once the package is installed you can use this command at command line to run the example:

  • sortapp

The image created in this way can be executed in a container with the following command:

  • docker run -i -t --rm --name sortapp-cont sortapp sortapp

##Useful Commands

###Create Distribution Package python3 setup.py sdist --formats=gztar

###Create Docker Image docker build -t sortapp .

###Save Docker Image in file docker save sortapp | gzip > sortapp.tar.gz

###Publish Docker Image on DockerHub Name your local images using: By re-tagging an existing local image:

  • docker tag sortapp /[:]

Login in DockerHub(use your Docker ID):

  • docker login

Now you can push this repository to the registry designated by its name or tag:

  • docker push /:

Then logout for security:

  • docker logout