Sign inSign up

cyb3rjak3/html5validator

By cyb3rjak3

•Updated about 1 year ago

Docker container that has html5validator installed. Useful for linting in the CI process.

Image
Developer tools
5

50K+

cyb3rjak3/html5validator repository overview

⁠HTML5Validator

Docker Pulls

Actions Status Actions Status

This is a docker image made to test HTML code. I developed it for my website⁠ using GitLab pipelines. This will work for any sort of pipeline solution. It setups up a container that has html5validator⁠ installed, which saves time with the testing process.

There are images available through GitHub, Docker Hub or GitLab.

⁠To use

First figure out the version you want then checkout out the source⁠

⁠GitLab Pipeline

Using the source of your choosing you will want something like:

html_test:
  stage: test
  image: cyb3rjak3/html5validator:latest-alpine
  script:
    - html5validator --root public/ --also-check-css --log INFO

Which is used by this project⁠

⁠GitHub Action

For GitHub Actions, please use the action that I have built here: HTML5 Validator⁠ The action is built using this image

Source Repo⁠

⁠Local
# Pull the image of your choosing. Only has to be done once
docker pull cyb3rjak3/html5validator:latest-alpine

# If your code is in a relative directory called `public`
docker run --rm -i -v $(pwd):/mnt -w /mnt cyb3rjak3/html5validator:latest-alpine html5validator --root public

⁠Sources

You can pull the image from either Docker Hub, GitHub, or GitLab. Currently the default images are based off of python:3.8.6-alpine3.12 there are images available using python:3.8.6-slim.

To use the slim based images add -slim to the tag you are using, i.e. cyb3rjak3/html5validator:latest becomes cyb3rjak3/html5validator:latest-slim.

Docker⁠GitHub⁠Gitlab⁠
pypicyb3rjak3/html5validator:pypighcr.io/cyb3rjak3/html5validator:pypiregistry.gitlab.com/cyb3r-jak3/html5validator-docker:pypi
sourcecyb3rjak3/html5validator:sourceghcr.io/cyb3rjak3/html5validator:sourceregistry.gitlab.com/cyb3r-jak3/html5validator-docker:source
experimentalcyb3rjak3/html5validator:experimentalghcr.io/cyb3rjak3/html5validator:experimentalregistry.gitlab.com/cyb3r-jak3/html5validator-docker:experimental

⁠Tags

There are currently three tags for this image: source, pypi, and experimental. The source tag involves building html5validator from source⁠, the PyPI installs the packaged version, and the experimental branch builds from my fork of html5validator⁠. The PyPi tag is more stable than the source branch, thus it is the latest tag.

Tag summary

Content type

Image

Digest

sha256:f5785c112…

Size

229.7 MB

Last updated

about 1 year ago

docker pull cyb3rjak3/html5validator