-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bumped version number * added instructions for linting and fixed Dockerfile linting messages * added github action for hadolint
- Loading branch information
Showing
4 changed files
with
103 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ignored: | ||
- SC3028 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
name: Lint Dockerfile | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
jobs: | ||
dockerfile_linting: | ||
name: Dockerfile linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: hadolint/[email protected] | ||
with: | ||
dockerfile: ./Dockerfile | ||
config: ./.config/hadolint.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,22 @@ | ||
# Galette Docker project | ||
Building and maintaining this project is solely about the containerization of the finished Galette packages. If you want to contribute to Galette itself, take a look [here](https://galette.eu/site/contribute/). | ||
|
||
## Prerequisites | ||
- `docker` is installed in your development environment. | ||
- `dockerd` the docker deamon is installed (and [started](https://docs.docker.com/config/daemon/start/)) | ||
- `buildx` is installed in your development environment. | ||
|
||
Although it's possible to build packages without `dockerd` running, using [`buildah`](https://buildah.io/), the focus here is on [`buildx`](https://docs.docker.com/reference/cli/docker/buildx/). You're welcome to contribute with instructions for `buildah`. | ||
|
||
## Linting | ||
1. Start the docker daemon if it's not already started: `sudo dockerd` | ||
2. Run hadolint (containerized): `docker run --rm -i -v ./.config/hadolint.yml:/.config/hadolint.yaml hadolint/hadolint < Dockerfile` | ||
3. Fix errors and warnings or add them to ignore list of the [hadolint configuration file](./.config/hadolint.yml) if there is a good reason for that. Read more [here](https://github.com/hadolint/hadolint). | ||
|
||
## Building the docker image locally | ||
[comment]: <> (From https://www.techrepublic.com/article/how-to-build-a-docker-image-and-upload-it-to-docker-hub/) | ||
* Start the docker daemon if it's not already started: `sudo dockerd` | ||
* Run the build command: `docker buildx build -t galette-local .` | ||
1. Start the docker daemon if it's not already started: `sudo dockerd` | ||
2. Run the build command: `docker buildx build -t galette-local .` | ||
* replace `galette-local` with any name you would like to give your local image | ||
|
||
## Running the docker image locally | ||
1. Follow the same steps as in [How to use this image](./README.md#How-to-use-this-image), replacing the image name `galette/galette:latest` with your local container name, e.g. `galette-local`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters