https://github.com/adehad/cross-platform-jenkins-py-dev
Unix/Windows Dockerfile and Jenkinsfile example (python) configurations
https://github.com/adehad/cross-platform-jenkins-py-dev
dockerfile dockerfile-examples jenkins jenkinsfile python
Last synced: about 1 month ago
JSON representation
Unix/Windows Dockerfile and Jenkinsfile example (python) configurations
- Host: GitHub
- URL: https://github.com/adehad/cross-platform-jenkins-py-dev
- Owner: adehad
- License: cc0-1.0
- Created: 2022-08-06T11:28:44.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-06T11:44:57.000Z (almost 4 years ago)
- Last Synced: 2025-06-06T22:07:24.440Z (12 months ago)
- Topics: dockerfile, dockerfile-examples, jenkins, jenkinsfile, python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cross Platform Python Development Docker & Jenkins
## Context
For reasons outside my control I needed to use [Jenkins][jenkins].
Was surprised that Jenkins required specifying the shell for all terminal commands.
Not really looking to do two `Jenkinsfile`s prefixing with `bat` vs `sh`,
I created a relatively platform invariant file and the corresponding `Dockerfile`s.
The agents were both pretty barebones, so you may find that you can offload
steps to the agent and avoid the `Dockerfile` all together. In my case this was
a useful exercise to understand more about `docker` and Jenkins.
## Gotchas
1. `Dockerfile.windows` runs on Windows Server Core, which needs a specific license on the machine run.
> The Windows container feature is only available on Windows Server 2016 (Core and with Desktop Experience), Windows 10 Professional and Enterprise (Anniversary Edition) and later.
> > See details on: [Docker - Windows Server Core][ms-windowsservercore]
2. I had enormous troubles with the `PATH` variable on the unix agent and had to
add a workaround. I'm sure there is a better way, and perhaps you won't have
this problem.
[jenkins]: https://www.jenkins.io "Jenkins Website"
[ms-windowsservercore]: https://hub.docker.com/_/microsoft-windows-servercore