GitLab now enforces expiry dates on tokens that originally had no set expiration date. Those tokens were given an expiration date of one year later. Please review your personal access tokens, project access tokens, and group access tokens to ensure you are aware of upcoming expirations. Administrators of GitLab can find more information on how to identify and mitigate interruption in our documentation.
We first need to retrieve the python docker image on the official docker website https://hub.docker.com/_/python
.
Then we set a working directory and copy our python file to the Docker container. We don't need to install any dependencies so we need not to copy them or install anything using pip.
Finally, we define the command that the Docker application meeds to execute at the startup of the container. This command runs the Python script we copied into the Docker container.