Skip to content

Commit

Permalink
Added Docker version (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Sep 12, 2015
1 parent 8bdf299 commit 62debb8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
/assh
/cmd/assh/assh
profile.out
dist/
dist/
docker/assh
docker/[0-9]*
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,14 @@ cover:
convey:
go get github.com/smartystreets/goconvey
goconvey -cover -port=9042 -workDir="$(realpath .)/pkg" -depth=-1


.PHONY: docker/assh
docker/assh:
goxc -bc=linux,386 -d=docker -o="{{.Dest}}{{.PS}}{{.ExeName}}{{.Ext}}" -include="" compile


.PHONY: docker
docker: docker/assh
docker build -t moul/assh:latest docker
docker run -it --rm moul/assh --version
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,19 @@ Get a released version on: https://github.com/moul/advanced-ssh-config/releases

* First Python version (POC)

## Docker

Experimental: `assh` may run in Docker, however you will have limitations:

* The `assh` containers does not have any binaries except `assh`, you can't use `ProxyCommand`, `ResolveCommand`...
* Docker may run on another host, `ssh localhost` will ssh to Docker host

```console
docker run -it --rm -v ~/.ssh:/.ssh moul/assh --help
```

`assh` in Docker is slower and has more limitations, but it may be useful for testing or if you plan to use a Docker host as a remote Gateway

## Alternative version

* [v1](https://github.com/moul/advanced-ssh-config/tree/v1) (2009-2015) - The original implementation. It worked quite well, but was a lot slower, less portable, harder to install for the user and harder to work on to develop new features and fix bugs
Expand Down
3 changes: 3 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM scratch
ADD ./assh /assh
ENTRYPOINT ["/assh"]

0 comments on commit 62debb8

Please sign in to comment.