Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use usr/bin/env to locate interpreter #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rbuckland
Copy link

Inside python:3.10-slim, the path to python3 is at /usr/local/bin/python3

Which causes the running of the systemctl replacement in this (and maybe other docker containers fail)

trying to launch via bash (command prompt)

root@8fa696f7b7a2:/build# /usr/bin/systemctl 
bash: /usr/bin/systemctl: cannot execute: required file not found

This is it working, specifying the python3 interpreter directly.

root@8fa696f7b7a2:/build# which python3
/usr/local/bin/python3

root@8fa696f7b7a2:/build# python3 /usr/bin/systemctl 
apt-daily-upgrade.service       loaded inactive dead    Daily apt upgrade and clean activities
apt-daily-upgrade.timer loaded unknown dead     Daily apt upgrade and clean activities
apt-daily.service       loaded inactive dead    Daily apt download activities
apt-daily.timer loaded unknown dead     Daily apt download activities
dpkg-db-backup.service  loaded inactive dead    Daily dpkg database backup service
dpkg-db-backup.timer    loaded unknown dead     Daily dpkg database backup timer
[email protected]        loaded inactive dead    Online ext4 Metadata Check for 
e2scrub_all.service     loaded inactive dead    Online ext4 Metadata Check for All Filesystems
e2scrub_all.timer       loaded unknown dead     Periodic ext4 Online Metadata Check for All Filesystems
[email protected]   loaded inactive dead    Online ext4 Metadata Check Failure Reporting for 
e2scrub_reap.service    loaded inactive dead    Remove Stale Online ext4 Metadata Check Snapshots
fstrim.service  loaded inactive dead    Discard unused blocks on filesystems from /etc/fstab
fstrim.timer    loaded unknown dead     Discard unused blocks once a week
hwclock.sh.service      loaded inactive dead
pam_namespace.service   loaded inactive dead    Make sure parent directories configured in /etc/security/namespace.conf for polyinstantiation exist

This is due to this issue

@rbuckland
Copy link
Author

This was using FROM python:3.10-slim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant