-
-
Notifications
You must be signed in to change notification settings - Fork 580
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
Can't disable DDEV-injected commands in webimage to launch with a custom web image #5786
Comments
Custom webimages and their outcomes are entirely your issue to sort out. We don't even have Any webimage you customize will have to conform to all the features that ddev-webserver has. hhvm/hhvm absolutely does not have those. I would expect complete failure going this route. If you want to run hhvm as part of a DDEV project, add it as an additional service. You can also set it up as an alternate back-end for nginx using a number of techniques. But this path isn't going to work. |
Thanks for the explanation! For a new project we need But So, at least just fixing the missing |
.pgpass is created in the process of setting up ddev-webserver. You can easily add a layer to your hhvm image that adds anything you want, and you can even do that in the Add it as a separate service. There are a number of examples of that (like "old php" in ddev-contrib, and there are some in Stack Overflow as well) |
Thanks, but I want to continue suffering a little bit before giving up and go with a separate service :) Still can't find a way to add a command before executing the If I create the |
You have two different options
|
Yeah, it works!!! RUN touch /home/$username/.pgpass
RUN echo "#!/bin/bash" >> /pre-start.sh && \
echo "" >> /pre-start.sh && \
echo "sudo nginx -g 'daemon off;'" >> /pre-start.sh && \
echo "sleep infinity" >> /pre-start.sh && \
chmod +x /pre-start.sh
RUN apt-get update && apt-get install nginx sudo -yy
RUN echo "ALL ALL=(ALL:ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
RUN sed -i 's/# listen 443 ssl/listen 443/' /etc/nginx/sites-available/default And it builds with a custom image (checked with Of course, there can be a lot of missing scripts for some ddev features, but at least it starts and the base functionality works well! |
By the way, why ddev checks the 443 ssl port as healthcheck? I think 80 port should be enough. |
DDEV servers the site on both HTTP ( |
Congratulations @MurzNN ! I don't understand exactly what you're saying, the ddev-webserver healthcheck.sh checks only http, https://github.com/ddev/ddev/blob/120cbe5ed6973bb42782014e493bbe183cafdbda/containers/ddev-webserver/ddev-webserver-base-scripts/healthcheck.sh You are also able to overwrite that healthcheck.sh if you need to in your Dockerfile. |
Is there an existing issue for this?
Output of
ddev debug test
Expand `ddev debug test` diagnostic information
Expected Behavior
I need to launch ddev with a custom PHP image
hhvm/hhvm
, so I'm putting the custom image name in the.ddev/config.yaml
:But after that - the ddev projects fail to start with an error:
Actual Behavior
It should start well with a custom image.
At least, it should be a way to disable build-in webimage commands.
Steps To Reproduce
.ddev/config.yaml
:Anything else?
There is a strange hardcoded command that causes the error:
ddev/pkg/ddevapp/config.go
Line 932 in c9aa2b7
How the
.pgpass
file can exist in the just-created empty directory? Seems we should check if it exists before chmoding.The text was updated successfully, but these errors were encountered: