Closed dsfai2020 closed 4 months ago
Ran into a couple issues on Windows 10.
Apt-get won't even work at the moment. Tried configuring it through the docker terminal and ran into a dead end. Permission was denied. Sudo as well.
As it stands, The docker image works. Jenkins runs on the local ports it makes. It supports Debian but it just doesn't seem to come pre configured with python.
[ ] Check how to mount another container to it that DOES have python that way they are isolated.
YAML config most likely needed
https://docs.docker.com/get-started/07_multi_container/
Here's a lead.
NETWORKING CONTAINERS "So, how do you allow one container to talk to another? The answer is networking. If you place the two containers on the same network, they can talk to each other."
Python lead for docker here. (You'll need it for pytest in Jenkins and eventually you'll need it for dev servers on the backend.
powershell needed a local python interpreter so I downloaded one from the store windows store to simplify the process on Windows.
Ran into a new issue where python isn't being detected on the PATH for Windows powershell OR command prompt.
powershell needed a local python interpreter so I downloaded one from the store windows store to simplify the process on Windows.
Ran into a new issue where python isn't being detected on the PATH for Windows powershell OR command prompt.
https://stackoverflow.com/questions/58754860/cmd-opens-windows-store-when-i-type-python
I had to go into the env settings and move the directory that houses the windows apps (since it was from the store) to the top of the list. I did this for both local and global. Then I went into the Alias page and disabled and re-enabled the windowed mode and regular mode pythons. This fixed the problem.
Now that python is working run these commands to get the venv up and running.
python -m venv nameofenv
nameofenv\Scripts\activate
Resuming steps for the python Docker setup at https://docs.docker.com/language/python/build-images/
Ran into an issue where docker wouldn't build on powershell because the Docker Daemon wasn't running. To resolve this I'll attempt to run powershell as Admin.
powershell, command terminal, and vscode terminal are all throwing the same error regardless of admin rights.
This happens if I put in docker build
or
docker build --tag python-docker
DO NOT FORGET THE PERIOD at the end of docker build .
docker build .
Running the command without a tag created a nameless container
But running it with the tag as follows gave it a name.
docker build --tag python-docker .
Now the name displays.
Now the image displays on Docker Desktop as well.
This concludes https://docs.docker.com/language/python/build-images/
Next up is:
This process is to take place on Windows 10 using Docker. While also having Jenkins installed on a container that not only runs, but supports pytest from within docker as well.
ON WINDOWS 10
ON JENKINS/DOCKER
[x] make sure that it activates a venv and installs the packages from the python env of the repo from the terminal
[ ] make sure that properly runs a basic test
[ ] make sure that it then passes the test
[ ] ensure that the script for jenkins pulls the project in from github to its jenkins directory (which is hosted within Docker)
[ ] Once that is done, connect multiple containers (python and Jenkins) so that python is supported within Docker.
Failure in any of these areas results in a non completion.