We avoid the resultant Synta圎rror by sticking with Python 3.6. Unfortunately, Python 3.7 introduced that exact word as a keyword. If you do happen to use Google Firebase with Python, you will likely use the python-firebase module, which contains an import called async. Warning: It’s also worth noting that we’re using Python 3.6 here you don’t need to stick to this unless you will be using Google Firebase (which we won’t be using here, but it’s good to be aware of this). As you may have guessed, it means Debian 10.x - but trimmed down, resulting in a smaller package size.Ī full list of official Python images is available here.įirestore (NoSQL database) is offered through Google’s Firebase platform. Slim, on the other hand, does make sense. This pre-built image is, in essence, nothing more than a lightweight Linux OS containing Python 3.6.īut why ‘slim-buster’? Well, buster is the codename for all version 10 variations of Debian (a Linux Distribution).Īs for why they chose the word ‘buster’ - I think someone opens a dictionary and picks the first word they see. The very first line of our Dockerfile initializes our container image with another pre-built Docker image. Initially, it may look confusing - but it’s incredibly simple. RUN pip install -r requirements.txt CMD exec gunicorn -bind :$PORT -workers 1 -threads 8 -timeout 0 app:app It looks like this: FROM python:3.6-slim-buster WORKDIR /app COPY. Later, we will also give the blueprint to our builder (Google Build), who will construct the house (container) for us - but not yet. We create a set of instructions for what we want our house to be like (the Dockerfile), which we then give to our architect (Docker), who then does all the technical stuff to produce a house blueprint (the image). Our scripts and files are raw materials (timber, bricks, etc.).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |