fair-software / howfairis

Command line tool to analyze a GitHub or GitLab repository's compliance with the fair-software.eu recommendations
https://pypi.org/project/howfairis/
Apache License 2.0
58 stars 23 forks source link

Bump dockerfile, make build context smaller #345

Closed jspaaks closed 2 years ago

jspaaks commented 2 years ago

List of related issues or pull requests

Refs: N/A

Describe the changes made in this pull request

Updated Dockerfile:

  1. now uses a more recent FROM image, now using python 3.10.6 and alpine 3.16
  2. updates pip before installing the package
  3. smaller Docker context using .dockerignore (< 0.5MB, was >120MB)
  4. some minor doc changes

Instructions to review the pull request

(have a working docker installation)

# make a temp directory, cd into it
cd $(mktemp -d --tmpdir howfairis.XXXXXX)

# get a copy of the repo
git clone https://github.com/fair-software/howfairis .

# checkout the branch
git checkout bump-dockerfile

# build howfairis docker image
docker build -t fairsoftware/howfairis:latest .

# run an example on github and on gitlab
docker run -ti --rm fairsoftware/howfairis:latest https://github.com/fair-software/howfairis-livetest
docker run -ti --rm fairsoftware/howfairis:latest https://gitlab.com/jspaaks/howfairis-livetest

# look inside the docker container if everything looks OK
docker run -ti --rm --entrypoint /bin/sh fairsoftware/howfairis:latest 
apk add tree 
tree -a
sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information