-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
slim build results in /usr/sbin/apache2ctl mkdir, mktemp and chmod: not found #663
Comments
is there a specific reason you are using docker compose? do you have special config params for your php app (e.g., a mounted volume or an environment variable) or do you have other containers your php app depends on? need to investigate more... in the meantime, you can try this to see if you have better results: https://github.com/mintoolkit/mint/releases/tag/1.41.1 |
Yes we have a mounted volume (plus a few other reasons).
I'll look at that suggestion later, when back in front of computer, thanks.
|
Tried mint, with exactly the same outcome :-( |
Generally if the container has parameters in the compose service definition those parameters need to be provided in the build call. Alternatively, you can point at the compose file you have and the service definition in it (using the Is there more you can share about the image you have? The php base image info is a good start. What kind of app do you have in the image? Is it a server app? Does it expose a port? How do your entrypoint and/or cmd instructions look like? Do you have a wrapper script to start your app? What does it do? |
Expected Behavior
docker compose up
to start the container successfullyActual Behavior
When using a slim image,
docker compose up
results in a failed container start, with errors:Steps to Reproduce the Problem
docker compose build creates an image (approx 1GB). On this,
docker compose up` works as expected.slim this image, using
slim build image_name
- this results in an image approx 90MBHowever, running
docker compose up
using this .slim image results in the errors as per above.The base docker image is php:8.1-apache
I haven't provided the contents of usr/sbin/apache2ctl as mkdir, mktemp and chmod are standard functions so unsure why they are not found in the slim image.
I thought perhaps $PATH is getting 'broken' during the slim build so tried:
slim build --include-path /usr/local/sbin image_name
but no difference.
I'm unsure as to what to change as part of the slim build to restore these basic functions!
EDIT/UPDATE:
whereis chmod
in the working container, which returned/usr/bin/chmod
lim build --include-path /usr/bin/chmod image_name
docker compose up
is slightly different, suggesting it's found chmod, but still errorsSlim Version
slim version linux/amd64|Transformer|1.40.11|1b271555882eacdfb4e6598d6d0552e9b9b1449b|2024-02-02_01:36:22PM
The text was updated successfully, but these errors were encountered: