-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always use python3 during molecule testing
Python2 went out of style more than a decade ago, and was "sunset" over four years ago, 2020-01-01. Sure CentOS might have some additional python2 support thanks to RedHat, but you know what else it has? Python3. And with epel-release, we get access to python3-PyMySQL, which allows us to keep things simple. The geerlingguy centos7 comes without python3, so we can either drop it, or roll our own. This is the roll-your-own approach. Grab the latest packaged molecule 4 release and the latest molecule-docker straight from git. There's a fix that went in after 2.1.0 (cb1c1c31a4a468fb243fc2000656504a3ca00bb3) that fixes a bug where the molecule.yml would get overwritten during image building.
- Loading branch information
Showing
4 changed files
with
45 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM {{ item.base_image }} | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip systemd-sysv | ||
CMD ["/sbin/init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM {{ item.base_image }} | ||
RUN yum install -y python3-pip | ||
CMD ["/sbin/init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters