Comments (12)
@Mahdi-Hosseini Did any of the solutions (one, two) work for you?
from ciao.
This should be an easy to implement feature. I will open a PR today with the changes.
from ciao.
@Mahdi-Hosseini Suppose you are using Docker to deploy ciao. Why don't you add your needed certs by mounting them in the container?
If the certificate store on the host is compatible with the guest (Docker container based on alpine Docker image), you can just mount it:
docker run --name ciao \
-p 8090:3000 \
-v /etc/ssl/certs:/etc/ssl/certs:ro \
brotandgames/ciao
Would this solution work for you?
from ciao.
@Mahdi-Hosseini If the host is not compatible with the guest you would have to mount the cert(s) into /usr/local/share/ca-certificates
and run update-ca-certificates
before ./start.sh
like
docker run --name ciao \
-p 8090:3000 \
-v /path/to/certs:/usr/local/share/ca-certificates \
brotandgames/ciao \
update-ca-certificates && ./start.sh
from ciao.
@brotandgames I think we should change:
CMD ["./start.sh"]
in the docker file to:
ENTRYPOINT ["./start.sh"]
and change start.sh
to not run rails s
.
Then he could run:
docker run --name ciao \
-p 8090:3000 \
-v /path/to/certs:/usr/local/share/ca-certificates \
brotandgames/ciao \
update-ca-certificates
Which will run the passed CMD update-ca-certificates
and the entrypoint as well start.sh
from ciao.
@brotandgames #29 this is a simple change and provides more flexibility to target this issue.
from ciao.
@tareksamni
From StackOverflow:
ENTRYPOINT should be defined when using the container as an executable
or
The ENTRYPOINT specifies a command that will always be executed when the container starts. The CMD specifies arguments that will be fed to the ENTRYPOINT.
or
CMD should be used as a way of defining default arguments for an ENTRYPOINT command or for executing an ad-hoc command in a container.
Would leave it as it is and what's wrong with just simply overriding the CMD?
from ciao.
I use ENTRYPOINT
as an "entry point" to bootstrap the environment for the application to run. For ex. to rake db:migrate
or run any other dependencies. and then execute the CMD afterwords. This is a good practice and most of the docker public images are doing the same. It's not delivering or preventing an immediate value in our project now but it's a good practice to isolate the actual command "rails s" and any other work to happen before "bootstrap".
from ciao.
This is a good practice and most of the docker public images are doing the same.
Don't agree. Here you can find a nice explanation.
from ciao.
This explanation is exactly what I understand about CMD
and ENTRYPOINT
and that's why I was recommending using the ENTRYPOINT
. It's offtopic anyway :)
Just examples from the open-source community:
https://github.com/docker-library/postgres/blob/master/Dockerfile-alpine.template
https://github.com/docker-library/redis/blob/master/5.0/Dockerfile
https://github.com/docker-library/rabbitmq/blob/master/Dockerfile-alpine.template
https://github.com/docker-library/mongo/blob/master/4.1/Dockerfile
from ciao.
In your examples the ENTRYPOINT
is used in another way than in the explanation above.
As you stated: it's off-topic anyway ;)
Want to keep the start.sh
as it is and if someone needs to overwrite the CMD
it's simple as shown here.
from ciao.
Yes, thank you for providing those tips!
from ciao.
Related Issues (20)
- please add a demo HOT 1
- Docker build on linux/arm* fails HOT 1
- Running on M1 fails to start HOT 2
- multiple checks
- webhook is no work HOT 1
- Ability to check the status of redirected URL. HOT 1
- ignore the ssl certificate errors so that sites with self-signed certificates can be checked for availability HOT 2
- CIAO_BASE_URL option HOT 7
- Feature request: Notify on TLS/SSL Certificate expiration HOT 3
- Disable TLS expiration notifications HOT 1
- treshhold for consecutive check failure HOT 4
- Docker build error. LoadError: cannot load such file -- sqlite3/sqlite3_native (LoadError) HOT 10
- can't send mail HOT 3
- error converting YAML to JSON: yaml: line 12: did not find expected key HOT 1
- Gotify Notification not sending. HOT 6
- Can it support monitoring of specified URLs through http or socks proxy? HOT 1
- Disable certificate verification HOT 2
- Cron does not work correctly at time setting HOT 1
- Mobile app for android/iOS HOT 1
- Feature Request ICMP (Ping) to IP or hostname. HOT 1
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 ciao.