update consul

Signed-off-by: Jessica Frazelle <princess@docker.com>
This commit is contained in:
Jessica Frazelle 2015-06-09 13:44:12 -07:00
parent 9f41315fe1
commit 33f61097bc
4 changed files with 62 additions and 33 deletions

44
bashrc
View File

@ -1,23 +1,25 @@
#!/bin/bash
command_not_found_handle () {
# Check if there is a container image with that name
if ! docker inspect --format '{{ .Author }}' "$1" >&/dev/null
then
echo "$0: $1: command not found"
return
fi
# Check that it's really the name of the image, not a prefix
if docker inspect --format '{{ .Id }}' "$1" | grep -q "^$1"
then
echo "$0: $1: command not found"
return
fi
docker run -ti -u $(whoami) -w "$HOME" \
$(env | cut -d= -f1 | awk '{print "-e", $1}') \
-v /dev/snd:/dev/snd \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/group:/etc/group:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /home:/home \
-v /tmp/.X11-unix:/tmp/.X11-unix \
"$@"
# Check if there is a container image with that name
if ! docker inspect --format '{{ .Author }}' "$1" >&/dev/null; then
echo "$0: $1: command not found"
return
fi
# Check that it's really the name of the image, not a prefix
if docker inspect --format '{{ .Id }}' "$1" | grep -q "^$1" ;then
echo "$0: $1: command not found"
return
fi
docker run -ti -u $(whoami) -w "$HOME" \
$(env | cut -d= -f1 | awk '{print "-e", $1}') \
-v /dev/snd:/dev/snd \
-v /etc/passwd:/etc/passwd:ro \
-v /etc/group:/etc/group:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /home:/home \
-v /tmp/.X11-unix:/tmp/.X11-unix \
"$@"
}

View File

@ -1,17 +1,22 @@
FROM debian:jessie
MAINTAINER Jessica Frazelle <jess@docker.com>
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
unzip \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV CONSUL_VERSION 0.5.2
ADD https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/consul /usr/local/bin/consul
ADD https://jesss.s3.amazonaws.com/binaries/curl-unix-socket /usr/local/bin/curl-unix-socket
COPY ./dist/ /usr/src/consul
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
# download the ui
RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/ui.zip -o /tmp/ui.zip \
&& unzip /tmp/ui.zip -d /usr/src/ \
&& rm -rf /tmp/ui.zip \
&& mv /usr/src/dist /usr/src/consul \
&& mkdir -p /etc/consul.d/ \
&& chmod +x /usr/local/bin/consul \
&& chmod +x /usr/local/bin/curl-unix-socket

View File

@ -1,10 +1,21 @@
FROM debian:jessie
# Visual Studio in a container
# NOTE: Needs the redering device (yeah... idk)
#
# docker run -d \
# -v /tmp/.X11-unix:/tmp/.X11-unix \
# -e DISPLAY=unix$DISPLAY \
# --device /dev/dri \
# --name visualstudio \
# jess/visualstudio
FROM jess/chromium
MAINTAINER Jessica Frazelle <jess@docker.com>
RUN apt-get update && apt-get install -y \
build-essential \
ca-certificates \
curl \
git \
libasound2 \
libgconf-2-4 \
libgnome-keyring-dev \
@ -13,18 +24,26 @@ RUN apt-get update && apt-get install -y \
libpci3 \
libxtst6 \
unzip \
zip \
--no-install-recommends
ENV HOME /home/user
RUN useradd --create-home --home-dir $HOME user \
&& chown -R user:user $HOME
# install node
RUN curl -sL https://deb.nodesource.com/setup | bash -
RUN apt-get update && apt-get install -y \
nodejs \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* \
&& npm update -g
# download the source
RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/VSCode-linux-x64.zip -o /tmp/vs.zip \
&& unzip /tmp/vs.zip -d /usr/src/ \
&& rm -rf /tmp/vs.zip
&& rm -rf /tmp/vs.zip \
&& ln -snf /usr/src/VSCode-linux-x64/Code /usr/local/bin/code
ENTRYPOINT [ "/usr/src/VSCode-linux-x64/Code" ]
COPY start.sh /usr/local/bin/start.sh
WORKDIR $HOME
ENTRYPOINT [ "/usr/local/bin/start.sh" ]

3
visualstudio/start.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
su user -c code