Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • diffoscope diffoscope
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 145
    • Issues 145
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Reproducible BuildsReproducible Builds
  • diffoscopediffoscope
  • Issues
  • #104
Closed
Open
Issue created May 09, 2020 by Emanuel Bronshtein@e3amn2l

Multiple improvements for Dockerfile

There are multiple issues in the used Dockerfile, so I suggest a small refactor/change for fixing:

  • Fix #103 (closed)
  • Fix #102 (closed)
  • Missing WORKDIR instruction (default working directory inside the container currently is / )
  • Use COPY instead of ADD
    • local directory is used which is not archive or remote url
  • Add CMD command with default --help arg
    • diffoscope invocation without params return "error: the following arguments are required: path1" with exit code 2, using default --help arg will return 0 exit code and the help text without error.
  • Copy only required files during deps install to avoid cache busts.
  • Remove dist-upgrade
    • docker documentation say to avoid it & it might not work at all https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get
  • Merge RUN commands to reduce number of layers inside the image
  • Fix "Use of apt-get update should be paired with rm -rf /var/lib/apt/lists/* in the same layer."
  • Dockerfile lint tools return zero (or accepted minimum) results
    • test with https://www.dockerfilelint.com and https://hadolint.github.io/hadolint/ and https://www.fromlatest.io and https://github.com/projectatomic/dockerfile_lint
  • Missing LABEL org.opencontainers.image.* entries

Will work on it in upcoming week and post a example of fixed Dockerfile as comment in this issue :)

Edited May 14, 2020 by Chris Lamb
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking