Skip to content

Commit a029431

Browse files
authored
Merge pull request #44 from rotemreiss/docker-support
Add Docker support.
2 parents d1655b9 + 952f8b4 commit a029431

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM golang:1-alpine AS build-env
2+
3+
RUN apk add --no-cache --upgrade git openssh-client ca-certificates
4+
RUN go get -u github.com/golang/dep/cmd/dep
5+
WORKDIR /go/src/app
6+
7+
# Install
8+
RUN go get -u github.com/google/addlicense
9+
10+
ENTRYPOINT ["addlicense"]

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,24 @@ to any file that already has one.
2323
The pattern argument can be provided multiple times, and may also refer
2424
to single files.
2525

26+
## Running in a Docker Container
27+
28+
- Clone the repository using `git clone https://github.com/google/addlicense.git`
29+
- Build your docker container
30+
```bash
31+
docker build -t google/addlicense .
32+
```
33+
34+
- Test the image
35+
```bash
36+
docker run -it google/addlicense -h
37+
```
38+
39+
- Usage example
40+
```bash
41+
docker run -v ${PWD}:/go/src/app/ -it google/addlicense -c "Google LLC" *.go
42+
```
43+
2644
## license
2745

2846
Apache 2.0

0 commit comments

Comments
 (0)