https://github.com/testertech/testcontainers-python-and-conu
Code for the YouTube video https://youtu.be/wlkimM5AdSU
https://github.com/testertech/testcontainers-python-and-conu
containers conu python testcontainers
Last synced: about 1 month ago
JSON representation
Code for the YouTube video https://youtu.be/wlkimM5AdSU
- Host: GitHub
- URL: https://github.com/testertech/testcontainers-python-and-conu
- Owner: TesterTech
- Created: 2021-05-16T18:35:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-16T19:45:49.000Z (almost 4 years ago)
- Last Synced: 2025-02-01T10:11:16.502Z (3 months ago)
- Topics: containers, conu, python, testcontainers
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# testcontainers-python-and-conu
## Blogpost
The original blogpost with the steps to setup Python testcontainers with ConU on Fedora.
https://fedoramagazine.org/test-containers-python-conu/Was posted on Fedora Magazine https://fedoramagazine.org/
## Python
- Python was version 3.9 initially. I used the alternatives to configure another version of Python on my system. Information on Alternatives https://linuxconfig.org/how-to-switch-between-python-versions-on-fedora-linux
- Installing python 3.7 ```sudo dnf install -y python3.7```
- After that I called the following command
```
sudo alternatives --install /usr/bin/python python /usr/bin/python3.7 1
sudo alternatives --install /usr/bin/python python /usr/bin/python3.9 2
```
- and then to choose the default one.
```
sudo alternatives --config python
```
- Later discovered that the symlink of /usr/bin/python3 was still pointing to python3.9, removed the link and created the link to just python so that the alternatives has effect.
```
cd /usr/bin
sudo rm /usr/bin/python3
(y)
sudo ln -s python3 python
```
## Docker
- To add $user to the docker group so you can run docker commands as a regular user.
```
sudo groupadd docker
sudo usermod -aG docker $USER
```
- Logout
- I restarted the docker service just in case. ```sudo service docker restart```
- See: https://docs.docker.com/engine/install/linux-postinstall/# References
- Testcontainers.org: https://www.testcontainers.org/
- Container Utilities: https://github.com/user-cont/conu
- Error docker (cgroups: cannot found cgroup mount destination: unknown): https://github.com/docker/for-linux/issues/219#issuecomment-375160449
- (Not in the video but found it valueble to share) https://conu.readthedocs.io/en/latest/reference/fixtures_index.html