Coder Social home page Coder Social logo

dockerfiles's Introduction

dockerfiles

A collection of Dockerfiles.

Description

This is a collection of dockerfiles that keep clean code.

Available dockerfiles are supported the following tools:

  • prettier: It's an opinionated code formatter, see the documents.
  • yamllint: It's a linter for YAML files, see the documents.
  • markdownlint: It's a style checker and lint tool for Markdown files, see the documents.
  • jsonlint: It's a JSON parser and validator, see the documents.

These are useful tools, but there is no official image. Therefore, this repository creates and distributes these lightweight images.

Usage

Pull

You can pull from Docker Hub or GitHub Packages, whichever you prefer. Using prettier as an example, pull as the following commands.

Docker Hub:

docker pull tmknom/prettier

GitHub Packages:

docker pull ghcr.io/tmknom/dockerfiles/prettier

The following shows how to use it when pulled from Docker Hub.

prettier

docker run --rm -v $(pwd):/work tmknom/prettier --check --parser=markdown README.md

For more information, see prettier/README.md.

yamllint

docker run --rm -v $(pwd):/work tmknom/yamllint -- .

For more information, see yamllint/README.md.

markdownlint

docker run --rm -v $(pwd):/work tmknom/markdownlint -- .

For more information, see markdownlint/README.md.

jsonlint

docker run --rm -v $(pwd):/work tmknom/jsonlint --compact --quiet foo.json

For more information, see jsonlint/README.md.

Supported platforms

  • linux/amd64
  • linux/arm64

Developer Guide

Click to see details

Requirements

Development

Creating a new Dockerfile

  1. Create <image_name>/ directory
  2. Define docker image: Dockerfile, entrypoint.sh, .dockerignore
  3. Manage package file: package.json or requirements.txt

Testing for a new Docker Image

  1. Create .github/tests/<image_name>/ directory
  2. Write test script: test.sh
  3. Add test fixtures: valid_<extension>.txt and invalid_<extension>.txt

Management for releasing and updating dependencies

  1. Create release action: .github/workflows/release-<image_name>.yml
  2. Configure version updates for dependencies: .github/dependabot.yml

Documentation for users

  1. Write details for the new docker image: <image_name>/README.md
  2. Update description and append usage: README.md

Test

Run the following command:

make test

Then pull image from Docker Hub and GitHub Packages, and run test scripts.

CI

When create a pull request, the following workflows are executed automatically at GitHub Actions.

Release management

  1. Update Dockerfile or package management file
  2. Commit, push, and create a pull request
  3. After merged, run Workflows with release- prefix automatically at GitHub Actions

Then, publishes Docker images to Docker Hub and GitHub Packages. ๐Ÿš€

Dependency management

Use Dependabot version updates. For more information, see dependabot.yml.

Secrets management

Stored environment secrets for the following environments in this repository.

release

Reference from releasing workflows such as .github/workflows/release-prettier.yml.

  • DOCKERHUB_TOKEN: Personal access token used to log against Docker Hub.

Versioning of the entire repository

1. Bump up to a new version

Run the following command to bump up.

make bump

This command will execute the following steps:

  1. Update VERSION
  2. Commit, push, and create a pull request
  3. Open the web browser automatically for reviewing pull request

Then review and merge, so the release is ready to go.

2. Publish the new version

Run the following command to publish a new tag at GitHub.

make release

Finally, we can use the new version! ๐ŸŽ‰

Changelog

See CHANGELOG.md.

License

Apache 2 Licensed. See LICENSE for full details.

dockerfiles's People

Contributors

dependabot[bot] avatar tmknom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.