2 Commits

Author SHA1 Message Date
2435201c80 use default dind network with public dns
Some checks failed
continuous-integration/drone/push Build is failing
2020-02-16 06:21:32 -08:00
f6efe03551 use mirror:// protocol for apt
Some checks failed
continuous-integration/drone/push Build was killed
2020-02-16 05:53:07 -08:00
4 changed files with 14 additions and 63 deletions

View File

@@ -4,7 +4,6 @@ name: default
steps: steps:
- name: docker - name: docker
image: plugins/docker image: plugins/docker
network_mode: bridge
settings: settings:
build_args: build_args:
- UBUNTU_MIRROR_URL=http://ubuntumirror.app.las1.eeqj.de/ubuntu - UBUNTU_MIRROR_URL=http://ubuntumirror.app.las1.eeqj.de/ubuntu

View File

@@ -4,7 +4,7 @@ ARG USERNAME_TO_ADD=user
ARG UID_TO_ADD=1000 ARG UID_TO_ADD=1000
ARG GID_TO_ADD=1000 ARG GID_TO_ADD=1000
ARG UBUNTU_MIRROR_URL=http://us.archive.ubuntu.com/ubuntu ARG UBUNTU_MIRROR_URL=mirror://mirrors.ubuntu.com/mirrors.txt
# setup # setup
ADD ./run.sh /tmp/run.sh ADD ./run.sh /tmp/run.sh
@@ -17,3 +17,5 @@ RUN apt-get clean && \
/tmp/* \ /tmp/* \
/var/tmp/* \ /var/tmp/* \
/etc/ssh/ssh_host_*_key /etc/ssh/ssh_host_*_key
EXPOSE 22

View File

@@ -1,55 +1,11 @@
# Usage # sneak/sandbox
FIXME update this example command
``` ```
docker run -d --name sandbox sneak/sandbox ; docker run -d -p 22:22 -v /home:/home sneak/sandbox
docker exec -ti sandbox script -q -c "TERM=xterm-color byobu" /dev/null
``` ```
(The 'script' bit works around a bug where `docker exec -t` doesn't
give you a usable tty.)
Or, if you're clever and run an Ubuntu mirror (or caching reverse proxy) on
your docker host:
```
docker run -d --add-host archive.ubuntu.com:172.17.0.1 --name sandbox sneak/sandbox ;
docker exec -ti sandbox script -q -c "TERM=xterm-color byobu" /dev/null
```
# Includes Things Like
* vim
* neovim
* rbenv
* default-jre
* docker (from docker)
* docker-compose
* docker-machine
* bash completion
* python (from ubuntu)
* setuptools
* virtualenv
* node4 (from ubuntu)
* coffeescript
* coffeelint
* go1.6 (from ubuntu)
* byobu and screen
* awscli (from pypi)
* irssi
* runit / daemontools
* envdir
* build-essential
* make
* latex and fonts (from ubuntu)
* Other useful misc tools
* pv
* pbzip2
* nmap
* ppss
* pwgen
* netcat and telnet
* and much more...
# TODO # TODO
* ctags / enhanced vim * ctags / enhanced vim
@@ -72,12 +28,12 @@ docker exec -ti sandbox script -q -c "TERM=xterm-color byobu" /dev/null
Feedback is appreciated, PRs are encouraged. Feedback is appreciated, PRs are encouraged.
Drop me an email or tweet [@sneakdotberlin](https://twitter.com/sneakdotberlin).
# Author # Author
Jeffrey Paul <sneak@sneak.berlin> Jeffrey Paul <sneak@sneak.berlin>
[sneak@sneak.berlin](mailto:sneak@sneak.berlin)
https://sneak.berlin https://sneak.berlin
[@sneakdotberlin](https://twitter.com/sneakdotberlin) [@sneakdotberlin](https://twitter.com/sneakdotberlin)

16
run.sh
View File

@@ -6,18 +6,12 @@ set -e
exec 1> >(tee -a /var/log/sandboxbuild.log) 2>&1 exec 1> >(tee -a /var/log/sandboxbuild.log) 2>&1
MURM="main universe restricted multiverse" MURM="main universe restricted multiverse"
M="http://us.archive.ubuntu.com/ubuntu" C="focal"
C="$(lsb_release -cs)"
if [[ ! -z "$UBUNTU_MIRROR_URL" ]]; then
M="$UBUNTU_MIRROR_URL"
fi
cat > /etc/apt/sources.list.new <<EOF cat > /etc/apt/sources.list.new <<EOF
deb $M $C $MURM deb $UBUNTU_MIRROR_URL $C $MURM
deb $M $C-updates $MURM deb $UBUNTU_MIRROR_URL $C-updates $MURM
deb $M $C-backports $MURM deb $UBUNTU_MIRROR_URL $C-backports $MURM
deb $M $C-security $MURM deb $UBUNTU_MIRROR_URL $C-security $MURM
EOF EOF
PKGS=" PKGS="