linkspector icon indicating copy to clipboard operation
linkspector copied to clipboard

Publish docker image to dockerhub and github packages using a github action

Open marcindulak opened this issue 1 year ago • 0 comments

Due to heavy dependencies (puppeteer + google chrome) the common usage of linspector will be most likely using a pre-built docker image, to minimize the risk of component installation failures, and increase the installation speed. Also pre-commit hooks will probably be of repository-local-hooks (calling a docker run) or docker_image type.

Publish docker image as umbrelladocs/linkspector. See publishing-docker-images as a starting point. Note the artifact attestation step included in the above doc. For covenience, most likely the latest explicit image tag of umbrelladocs/linkspector, e.g. v0.3.6 will be also pushed as the latest docker image tag. This will allow people who prefer to use the latest version to refer to umbrelladocs/linkspector:latest from CI systems.

Another observation: currently the docker build uses a non-standard default (requires --build-arg LINKSPECTOR_PACKAGE=) to build the image based on the local contents. This default could be changed in Dockerfile, so by default the local contents is used during the build

docker build --no-cache --pull -t umbrelladocs/linkspector .

while still support building of published npm

docker build --build-arg LINKSPECTOR_VERSION=@umbrelladocs/[email protected] -t umbrelladocs/linkspector:0.2.7 .

This is also an opportunity to reduce the confusion between potentially different 0.2.7 and v0.2.7 versions used by various services: npm, github, dockerhub.

marcindulak avatar May 10 '24 14:05 marcindulak