diff --git a/README.md b/README.md index 1540b3c..96ec203 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,20 @@ GITHUB_TOKEN CONFIG_FILE ``` +## Development + +As a developer if you would like to use container environment, run the following command + +```bash +docker-compose -f build/docker-compose-build.yaml up github-updates-make +``` + +If you get an error for lint checks, run the following command + +```bash +docker-compose -f build/docker-compose-build.yaml up github-updates-format +``` + ## Run Prefer to run it as a container, run the following command diff --git a/build/build.dockerfile b/build/build.dockerfile new file mode 100644 index 0000000..4272661 --- /dev/null +++ b/build/build.dockerfile @@ -0,0 +1,20 @@ +# Copyright 2021 Hyperledger Community +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM golang:1.16.3-alpine + +# Add make command +RUN apk add --no-cache make bash + +WORKDIR /app diff --git a/build/docker-compose-build.yaml b/build/docker-compose-build.yaml new file mode 100644 index 0000000..12df33e --- /dev/null +++ b/build/docker-compose-build.yaml @@ -0,0 +1,34 @@ +# Copyright 2021 Hyperledger Community +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +version: "3.6" + +services: + github-updates-make: + build: + context: . + dockerfile: build.dockerfile + container_name: github-updates-make + command: make + volumes: + - ../:/app + + github-updates-format: + build: + context: . + dockerfile: build.dockerfile + container_name: github-updates-format + command: make format + volumes: + - ../:/app