Skip to content

Commit

Permalink
add readme and actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoyamachi committed Dec 23, 2019
1 parent e52cb5d commit 74ad57e
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
assets
.circleci
.goreleaser.yaml
README.md
LICENSE
21 changes: 21 additions & 0 deletions .github/workflows/scheduled-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Scan with trivy
on:
schedule:
- cron: '* * * * *'
jobs:
scan:
name: Scan via trivy
runs-on: ubuntu-latest
steps:
- name: Scan image for vulnerabilities
uses: docker://docker.io/aquasec/trivy:v0.3.1
with:
args: --cache-dir /var/lib/trivy --exit-code 1 --no-progress goodwithtech/dockle:latest
sendmessage:
- name: Slack notification
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
MESSAGE: 'message'
USERNAME: scan-result
CHANNEL: times_amachi
uses: svikramjeet/git-actions@master
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM golang:1.13-alpine AS builder
COPY go.mod go.sum /app/
WORKDIR /app/
RUN apk --no-cache add git
RUN go mod download
COPY . /app/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o /dockertags cmd/dockertags/main.go

FROM alpine:3.11
COPY --from=builder /dockertags /usr/local/bin/dockertags
RUN chmod +x /usr/local/bin/dockertags
RUN apk --no-cache add ca-certificates shadow

# for use docker daemon via mounted /var/run/docker.sock
RUN addgroup -S docker && adduser -S -G docker dockertags
USER dockertags

ENTRYPOINT ["dockertags"]
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# dockertags
Show information of container image ordered by time tag created at.

Now supporting Docker Hub, GCR (Google Container Registry) and Amazon ECR (Elastic Container Registry).

<img src="assets/usage.gif" width="700">



## Quick Start

```bash
$ brew install goodwithtech/r/dockertags
$ dockertags [IMAGE_NAME]
```

or

$ docker run --rm goodwithtech/dockertags [IMAGENAME]
```
## When to Use

Make easy to fetch target tag in scheduled operation.
Expand Down Expand Up @@ -61,6 +66,7 @@ $ dockertags -limit 2 -contain v0.2 -format json goodwithtech/dockle
]
```

## GitHub Actions

## Authentication

Expand Down
Binary file added assets/usage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 74ad57e

Please # to comment.