Skip to content

Commit

Permalink
updated to use Alpine Linux as the base image.
Browse files Browse the repository at this point in the history
This update fixes the typ0 in the Dockerfile (thanks @ignar) and creates a _much_ smaller image (<8 MB)
  • Loading branch information
fruitl00p committed Nov 10, 2015
1 parent 48fa03f commit 1460ac1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Expand Up @@ -9,20 +9,15 @@
#
###

FROM ubuntu:14.04
FROM alpine:3.2
MAINTAINER Kingsquare <docker@kingsquare.nl>

ENV SSH_AUTH_SOCK /ssh-agent

####
# Install the SSH-client + clean APT back up
RUN DEBIAN_FRONTEND=noninteractive && \
apt-get update -q && \
apt-get install -yq openssh-client && \
apt-get autoremove --purge -yq
apt-get clean && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
# Install the SSH-client
RUN apk add --update openssh-client && rm -rf /var/cache/apk/*

VOLUME ["/ssh-agent"]
EXPOSE 2222
ENTRYPOINT ["/usr/bin/ssh", "-T", "-N", "-o", "StrictHostKeyChecking=false", "-o", "ServerAliveInterval=180", "-L"]
ENTRYPOINT ["/usr/bin/ssh", "-T", "-N", "-o", "StrictHostKeyChecking=false", "-o", "ServerAliveInterval=180", "-L"]
18 changes: 16 additions & 2 deletions README.md
Expand Up @@ -14,7 +14,11 @@ The full syntax for starting an image from this container:

* you would like to have a tunnel port 3306 on server example.com locally exposed as 3306

docker run -d --name tunnel_mysql -v $SSH_AUTH_SOCK:/ssh-agent kingsquare/tunnel *:3306:localhost:3306 me@example.com
```docker run -d --name tunnel_mysql -v $SSH_AUTH_SOCK:/ssh-agent kingsquare/tunnel *:3306:localhost:3306 me@example.com```

* you would like to have a tunnel port 3306 on server example.com locally exposed on the host as 3308

```docker run -d -p 3308:3306 --name tunnel_mysql -v $SSH_AUTH_SOCK:/ssh-agent kingsquare/tunnel *:3306:localhost:3306 me@example.com```


# Using as an Ambassador
Expand All @@ -31,4 +35,14 @@ This method allows for using this image as an ambassador to other (secure) serve

use the links in another container via exposed port 2222:

docker run --link staging-mongo:db.staging \ --link production-mongo:db.production \ my_app start
docker run --link staging-mongo:db.staging \
--link production-mongo:db.production \
my_app start

# Changelog

* 2015-11-10

Thanks to @ignar I took another look at the dockerfile and have updated it to use [AlpineLinux](http://www.alpinelinux.org/)
This results in a _much_ smaller image (<8mb) and is still just as fast and functional.
Thanks @ignar for bringing this container back to my attention :)

0 comments on commit 1460ac1

Please sign in to comment.