Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
kinnalru committed Aug 1, 2022
1 parent 4e465e0 commit 5ecaa34
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.gem
log/*
tmp/*
doc/*
envs/*
coverage/*
Dockerfile*
docker-compose*
/node_modules
config/keys/*
config/database.yml
config/secrets.yml
vendor/cache
rspec*

.gitignore
.gitlab-ci.yml
.git



5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ RUN mkdir -p /usr/local/etc \
# RUN set -ex \
# && apk add --no-cache build-base git curl

ADD Gemfile Gemfile.lock /home/app/
ADD Gemfile Gemfile.lock gitlab-janitor.gemspec /home/app/
ADD lib/gitlab-janitor/version.rb /home/app/lib/gitlab-janitor/

RUN set -ex \
&& gem install bundler && gem update bundler \
Expand All @@ -28,6 +29,6 @@ RUN set -ex \
&& bundle install --jobs=3 \
&& rm -rf /tmp/* /var/tmp/* /usr/src/ruby /root/.gem /usr/local/bundle/cache

CMD ["bundle", "exec", "giltab-janitor"]
CMD ["bundle", "exec", "bin/gitlab-janitor"]


11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# gitlab-janitor

[![Gem Version](https://badge.fury.io/rb/gitlab-janitor.svg)](https://rubygems.org/gems/gitlab-janitor)
[![Gem](https://img.shields.io/gem/dt/gitlab-janitor.svg)](https://rubygems.org/gems/gitlab-janitor/versions)
[![YARD](https://badgen.net/badge/YARD/doc/blue)](http://www.rubydoc.info/gems/gitlab-janitor)

GitLab Janitor is a tool to automatically manage stalled containers when using Docker.

Commain line options and default valuee:
Expand All @@ -19,7 +23,6 @@ Usage: gitlab-janitor.rb [options]
Docker api endpoint. ENV[DOCKER_HOST]
```


## Удаление зависших контейнеров

Порядок определения контейнреов для удаления:
Expand Down Expand Up @@ -49,4 +52,10 @@ Docker не сохраняет временную метку образа при

```bash
REMOVE=true INCLUDE="*integr*, *units*" EXCLUDE="*gitlab*" CONTAINER_DEADLINE="1h10m" VOLUME_DEADLINE="3d" IMAGE_DEADLINE="20d" ./main.rb
```

## Запуск в докере

```bash
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock rnds/gitlab-janitor:latest
```
1 change: 1 addition & 0 deletions gitlab-janitor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Gem::Specification.new 'gitlab-janitor' do |spec|
spec.add_development_dependency 'simplecov-console'
spec.add_development_dependency 'awesome_print'

spec.add_runtime_dependency 'tzinfo-data'
spec.add_runtime_dependency 'activesupport', '~> 6.0'
spec.add_runtime_dependency 'docker-api'
spec.add_runtime_dependency 'fugit'
Expand Down

0 comments on commit 5ecaa34

Please sign in to comment.