Skip to content

Commit 1460ac1

Browse files
committed
updated to use Alpine Linux as the base image.
This update fixes the typ0 in the Dockerfile (thanks @ignar) and creates a _much_ smaller image (<8 MB)
1 parent 48fa03f commit 1460ac1

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,15 @@
99
#
1010
###
1111

12-
FROM ubuntu:14.04
12+
FROM alpine:3.2
1313
MAINTAINER Kingsquare <docker@kingsquare.nl>
1414

1515
ENV SSH_AUTH_SOCK /ssh-agent
1616

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

2621
VOLUME ["/ssh-agent"]
2722
EXPOSE 2222
28-
ENTRYPOINT ["/usr/bin/ssh", "-T", "-N", "-o", "StrictHostKeyChecking=false", "-o", "ServerAliveInterval=180", "-L"]
23+
ENTRYPOINT ["/usr/bin/ssh", "-T", "-N", "-o", "StrictHostKeyChecking=false", "-o", "ServerAliveInterval=180", "-L"]

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ The full syntax for starting an image from this container:
1414

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

17-
docker run -d --name tunnel_mysql -v $SSH_AUTH_SOCK:/ssh-agent kingsquare/tunnel *:3306:localhost:3306 me@example.com
17+
```docker run -d --name tunnel_mysql -v $SSH_AUTH_SOCK:/ssh-agent kingsquare/tunnel *:3306:localhost:3306 me@example.com```
18+
19+
* you would like to have a tunnel port 3306 on server example.com locally exposed on the host as 3308
20+
21+
```docker run -d -p 3308:3306 --name tunnel_mysql -v $SSH_AUTH_SOCK:/ssh-agent kingsquare/tunnel *:3306:localhost:3306 me@example.com```
1822

1923

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

3236
use the links in another container via exposed port 2222:
3337

34-
docker run --link staging-mongo:db.staging \ --link production-mongo:db.production \ my_app start
38+
docker run --link staging-mongo:db.staging \
39+
--link production-mongo:db.production \
40+
my_app start
41+
42+
# Changelog
43+
44+
* 2015-11-10
45+
46+
Thanks to @ignar I took another look at the dockerfile and have updated it to use [AlpineLinux](http://www.alpinelinux.org/)
47+
This results in a _much_ smaller image (<8mb) and is still just as fast and functional.
48+
Thanks @ignar for bringing this container back to my attention :)

0 commit comments

Comments
 (0)