Skip to content

Commit

Permalink
Merge pull request #46 from knagware5/adddocker
Browse files Browse the repository at this point in the history
Introduced Docker based build environment
  • Loading branch information
arsulegai authored Jul 3, 2021
2 parents 4ca589e + b0cc890 commit cdba14c
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions build/build.dockerfile
Original file line number Diff line number Diff line change
@@ -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
34 changes: 34 additions & 0 deletions build/docker-compose-build.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cdba14c

Please sign in to comment.