Added instruction to removed the container along with stopping it to avoid error - You have to remove (or rename) that container to be able to reuse that name.
* Modifying pip3 install to python3 -m pip install for consistency across guide modules
In the other pages of the guide python3 -m pip install is used instead of pip3 install, the former being better practice as well. Therefore, replacing the use of pip3 install commands to the recommended one.
Separate command line instructions from the output to enable COPY/PASTE to make it quicker and easier to follow the guide without having to type commands.
This made necessary a minor rewrite of the "Test the application" section for clarity.
In the section `Use Compose to develop locally`, a docker-compose file is shown which mounts the app directory into the `notes` container to be able to change the code without rebuilding the image. Unfortunately, the node_modules directory which was created during the build will be overridden as the whole working directory /app gets mounted. Therefore, this directory needs to be secured by adding it to the volumes.
This commit fixes the error thrown due to a typo in the command docker-compose -f docker-compose.dev.yml up --build. The correct command is docker compose -f docker-compose.dev.yml up --build without the hyphen between 'docker' and 'compose' in the command sequence.
This commit fixes the error thrown due to a typo in the command `docker-compose -f docker-compose.dev.yml up --build`.
The correct command is `docker compose -f docker-compose.dev.yml up --build` without the hyphen between 'docker' and 'compose' in the command sequence
* Docs: update sample application initiation in venv
Until now, readers would install 'Flask' on their main system
python environment, freeze their entire packages, and grep only
the 'Flask' package! So they would be missing all the other
dependencies in their requirements file.
With this commit, a better practice is followed. First, create a
clean virtual environment, then install 'Flask' and freeze
everything into the requirements file.
Also, I recommend using 'python3 -m pip freeze' instead of 'pip3
freeze' while in the virtual environment. This is because
sometimes hidden quirks of 'pip' will ignore the actiavted
environment and freeze the entire python packages in the
system (e.g. in ArchLinux).
* Docs: update python sample testing application
In the previous commit, I forgot to update the 'Test the
application' section so that the users activate the virtual
environment first.
This commit fixes that.
Co-authored-by: Stefan Scherer <stefan.scherer@docker.com>