Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.69 KB

File metadata and controls

49 lines (36 loc) · 1.69 KB

template-docker best practices

README.md

  1. Use Markdown lint to adhere to Markdown rules.

Dockerfile

  1. Use best practices:
    1. Docker's Best practices for writing Dockerfiles.
    2. Project Atomic's Container Best practices.
  2. Use "lint" when applicable.
    1. Online linter: FROM: latest

    2. GitHub projectatomic/dockerfile_lint using Docker

      sudo docker run -it \
        --rm \
        --privileged \
        --volume $PWD:/root/ \
        projectatomic/dockerfile-lint \
          dockerfile_lint -f Dockerfile
    3. Note: Linters may erroneously report "ARG before FROM" which is supported as of Enterprise Edition 17.06.01 and Community Edition 17.05.0.

Makefile

  1. Modifications:

    1. Change following value to appropriate Docker tag.

      DOCKER_IMAGE_NAME := senzing/template
  2. Use make docker-build-base occasionally to populate the Docker image cache with layers that change infrequently.

  3. Once a "base" has been created, use make docker-build to build during development and make final builds.

CONTRIBUTING.md

  1. Modifications:
    1. Change following value to appropriate Git repository name.

      export GIT_REPOSITORY=template-docker