Comments (15)
Hey @magnetikonline, I decided on exposing 8888 instead of 80 since I need the HTML5 validator only. Works like a charm.
from docker-html5-validator.
Thanks for the issue post @boistordu - but I'm not quite sure I understand the problem here?
Since you're in a Docker container runtime listening on 0.0.0.0
won't help - as you still need to --publish
the port back to the host with docker run
.
Can you maybe provide a screenshot of what the issue is to help explain?
from docker-html5-validator.
well if I try the tool, when I entered something it will return to me a localhost address so not the adress of the server.... SO of course i would have a 404 error
nothing about ports here....
from docker-html5-validator.
Yeah I'm still not understanding. I just re-built the image from Dockerfile
to check.
- Run the image via
./run.sh
- Visit
http://127.0.0.1:8080/
on host. - Enter a URL - either local to your network or public internet. Local URL's will need to be resolvable via the container, so either a local DNS server in your network, or you might need to pass your
/etc/hosts
entries into the container at run time. - Page is validated.
I guess we might have a communication breakdown here?
from docker-html5-validator.
if you want to understand better I can pm you the adres and you can test by yourself
from docker-html5-validator.
there are no interface on the host. the run command was
`'docker run --restart=always --network=accessed --name valid -p 45116:80 -p 45117:8080 -d magnetikonline/html5validator``
and so obviously it's no different as your run.
from docker-html5-validator.
So after that run line - if you visit http://127.0.01:45116/
what do you get?
from docker-html5-validator.
@magnetikonline, do you have an idea how I'd deploy this with now.sh? I can start it by simply running now
, however, the form will redirect to localhost:8888
when submitting a URL with an HTML5 doctype: https://dockerhtml5validator-azybyqnlkf.now.sh. Same issue with now -p 8080:80 -p 8888:8888
.
from docker-html5-validator.
@magnetikonline sorry for the delay of answer.
127.0.0.1 did you understand that it was on a local VPS my installation right? The goal is to not having it on localhost no 127.0.0.1 then.... so if I upload a file from remote host it will put the following adress: http://localhost:8888/html5/#file
for bug debugging purposes, I've installed docker on one of the workstation and as @backflip have said, your html code is redirecting to localhost:8888 which is unusable for docker of course! You have to use environment variable or something else to retain the port redirection and your code html have to point it with this variable.
from docker-html5-validator.
@boistordu right, so finally I understand what you're saying now.
(For others reading):
- When submitting HTML to the validator, if the source is HTML5 the validator replays the validation against the HTML5 VNU validator.
- Currently the setup here is hardcoded to that endpoint being
localhost:8888/html5
, which is fine locally, but if you were to install this publicly or listening on an alternative domain a redirection/replay tolocalhost:8888
isn't going to help you.
As you say, will probably need to solve this with an environment variable to inject an alternative hostname/port as the environment itself can't possibly work this hostname out itself, also:
- Will probably need to avoid calling
supervisord
direct fromDockerfile
- instead call a bash script that adjusts/etc/w3c/validator.conf
with a given environment variable which is your desired public hostname. This could be baked intorun.sh
as an argument as well. - The adjustment would be to here before running Apache/HTML5 validator parts via
supervisord
https://github.com/w3c/markup-validator/blob/master/htdocs/config/validator.conf#L128.
I think I have given you the steps you need to solve this - so go at it! I might tackle this in the future if time allows, but for me personally - it's low use.
Thanks.
from docker-html5-validator.
@backflip seems your issue is very much related. Yeah I don't have a fix for now - short of hacking this:
https://github.com/magnetikonline/dockerhtml5validator/blob/master/resource/configure.sh#L82-L85
But that's not very flexible - so injecting a hostname/port via run.sh
into the container which is then used to modify validator.conf
before running services, would serve this better.
from docker-html5-validator.
I'll close this for now, as mentioned if I feel inspired I'll try to write an enhancement.
from docker-html5-validator.
@backflip nice one.... yep, that would do the trick 💃
from docker-html5-validator.
May I ask you why you download the old validator too in place of just the new one? Since it is standalone with a webui
from docker-html5-validator.
Okey so the vnu is working as expected in standalone. This is your combination with something which is not maintained anymore which cause the problem: w3c/markup-validator#17
from docker-html5-validator.
Related Issues (4)
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-html5-validator.