Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Омельченко Евгений Игоревич committed Aug 2, 2018
0 parents commit 2946278
Show file tree
Hide file tree
Showing 9 changed files with 1,248 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: 2

jobs:
image:
docker:
- image: docker:18.06
steps:
- checkout
- setup_remote_docker
- run: docker build
-t ${DOCKER_LOGIN}/crane:latest
.docker
- run: >
[ ${CIRCLE_TAG} ] && docker login -u ${DOCKER_LOGIN} -p ${DOCKER_PASSWORD} || true
- run: >
[ ${CIRCLE_TAG} ] && docker tag ${DOCKER_LOGIN}/crane:latest ${DOCKER_LOGIN}/crane:${CIRCLE_TAG} || true
- run: >
[ ${CIRCLE_TAG} ] && docker push ${DOCKER_LOGIN}/crane:latest ${DOCKER_LOGIN}/crane:${CIRCLE_TAG} || true
binary:
docker:
- image: golang:1.10-alpine
working_directory: /go/src/github.com/elemir/crane
steps:
- checkout
- run: apk add git musl-dev gcc
- run: go get -u github.com/golang/dep/cmd/dep
- run: go get -u github.com/tcnksm/ghr
- run: dep ensure -v
- run: go build --ldflags "-X main.DefaultRepo=$DOCKER_LOGIN -X main.DefaultTag=${CIRCLE_TAG:-latest} -s -w -linkmode external -extldflags '-static'" -o /tmp/crane
- run: >
[ ${CIRCLE_TAG} ] && ghr ${CIRCLE_TAG} /tmp/crane || true
- store_artifacts:
path: /tmp/crane

workflows:
version: 2
build:
jobs:
- image:
filters:
tags:
only: /^v.*/
- binary:
filters:
tags:
only: /^v.*/

3 changes: 3 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM alpine:3.8

RUN apk add --no-cache strace gdb vim bind-tools ethtool iproute2 iptables go mariadb-client redis
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor
crane
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

239 changes: 239 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"

[[override]]
name = "github.com/docker/docker"
revision = "3e1df952b7d693ac3961f492310852bdf3106240"

[[override]]
name = "github.com/docker/distribution"
revision = "0dae0957e5fe3156c265d22bef4cba9efbf388e2"

[[constraint]]
branch = "master"
name = "github.com/elemir/rainforest"

[[constraint]]
name = "github.com/fsouza/go-dockerclient"
version = "1.2.2"

[[constraint]]
name = "github.com/spf13/cobra"
version = "0.0.3"
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# crane ![CircleCI](https://img.shields.io/circleci/project/github/elemir/crane.svg) ![license](https://img.shields.io/github/license/elemir/crane.svg)
## description
crane -- small utility for debugging containerized application. It creates special debug container from prepared image which:

* uses IPC, PID и network namespaces from debugged container
* mount its filesystem into special path /cont

Loading

0 comments on commit 2946278

Please sign in to comment.