Comments (10)
For christian-charzewski-now's problem, I found a solution a it worked for me.
We have to make startup.sh
executable before we mount it into container, by this command:
chmod +x startup.sh
After that, this line can run without such that error:
docker run --rm -v $PWD/startup.sh:/etc/container/startup.sh thecodingmachine/php:8.0-v4-slim-apache
Hope this helps.
from docker-images-php.
Hey @tehmaestro,
I can confirm I reproduce your issue. I'll look into it.
In the meantime, you can use the environment variable STARTUP_COMMAND_XXX to execute startup commands:
STARTUP_COMMAND_1: sudo service ssh start
Note: I'm not sure the image contains a SSH server so this very command might not work. Are you sure you want to start a SSH server in the container? Usually, one would rather "exec" the "bash" command to connect to a container.
from docker-images-php.
Hi, thanks for the info. Yes, I am already using the startup command as a workaround and it works!
I'm deploying my container to Azure WebApp for Containers and I followed their instructions for installing the ssh server and exposing port 2222, in order to be able to ssh into the container. I am already installing openssh
PS: Freaking awesome docker image. Really cool! Thanks.
from docker-images-php.
PS: Freaking awesome docker image. Really cool! Thanks.
Thanks!
Issue is fixed. The image is currently building so you can "docker pull" the new image in about 40 minutes.
from docker-images-php.
I get the same error message with php:7.4-v3-slim-apache
docker run --rm -v startup.sh:/etc/container/startup.sh thecodingmachine/php:7.4-v3-slim-apache
sudo: /etc/container/startup.sh: command not found
My Startup.sh
#!/usr/bin/env bash
echo "startup.sh executed"
from docker-images-php.
Ok, I'm reopening the issue until I find where this comes from.
from docker-images-php.
Found it! The error is not in the image but in your test command line. With Docker, you must put an absolute path when mounting directories.
So the correct test line is:
docker run --rm -v $PWD/startup.sh:/etc/container/startup.sh thecodingmachine/php:7.4-v3-slim-apache
(pay attention to the $PWD/
in front of "/startup.sh")
from docker-images-php.
I still get the same error - does it work for you?
from docker-images-php.
Mmmm... yes it does.
Are you running this from the directory that contains "startup.sh"?
Also, could you try to download the latest version of the image bu running:
docker pull thecodingmachine/php:7.4-v3-slim-apache
from docker-images-php.
Strange
Pulling a new image didn't help either
docker pull thecodingmachine/php:7.4-v3-slim-apache
7.4-v3-slim-apache: Pulling from thecodingmachine/php
Digest: sha256:7ea9e7ed6779299af2aec0ee9b361eb1d8323bb5964db20e2e6d706d23c830b5
Status: Image is up to date for thecodingmachine/php:7.4-v3-slim-apache
docker.io/thecodingmachine/php:7.4-v3-slim-apache
I also tried building a docker image and copying the file to /etc/container/startup.sh and i still get the same error.
For now i solved it with the STARTUP_COMMAND_XXX env variables, so its not a real problem.
from docker-images-php.
Related Issues (20)
- Add decimal extension
- Cannot run Composer binaries without path anymore HOT 9
- Add uopz extension HOT 2
- Add libvips HOT 2
- Lots of `<defunct>` processes when using Cron HOT 2
- No rebuild with Composer 2.6.2? HOT 3
- Publishing image on other container registries HOT 4
- Docker fails when using non-privileged user HOT 2
- Add PHP 8.3 images HOT 15
- Extra extentions loading not working for BitBucket pipeline HOT 4
- Building image from php:8.2-v4-apache or php:8.3-v4-apache fails with modified php.ini query HOT 3
- Redis missing from fat image HOT 5
- Missing "gd" PHP extension HOT 3
- Composer 2.7 and CVE-2024-24821 HOT 1
- Extension opentelemetry HOT 1
- Install SQL Server (sqlsrv) and PDO_SQLSRV (pdo_sqlsrv) HOT 2
- GItlab ci: Composer cache permission denied HOT 3
- Outdated PHP versions for most 8.3 images HOT 2
- How do I get SSL working? HOT 1
- `./install.sh: 1: ../core/excimer: not found` in php 8.3 v4 slim apache
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-images-php.