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 748d8f9383
commit 8e085cbf4d
4 changed files with 62 additions and 33 deletions

44
bashrc
View File

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

View File

@@ -1,17 +1,22 @@
FROM debian:jessie FROM debian:jessie
MAINTAINER Jessica Frazelle <jess@docker.com> 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 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/consul/${CONSUL_VERSION}/consul /usr/local/bin/consul
ADD https://jesss.s3.amazonaws.com/binaries/curl-unix-socket /usr/local/bin/curl-unix-socket ADD https://jesss.s3.amazonaws.com/binaries/curl-unix-socket /usr/local/bin/curl-unix-socket
COPY ./dist/ /usr/src/consul # download the ui
RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/consul/${CONSUL_VERSION}/ui.zip -o /tmp/ui.zip \
RUN apt-get update && apt-get install -y \ && unzip /tmp/ui.zip -d /usr/src/ \
ca-certificates \ && rm -rf /tmp/ui.zip \
curl \ && mv /usr/src/dist /usr/src/consul \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /etc/consul.d/ \ && mkdir -p /etc/consul.d/ \
&& chmod +x /usr/local/bin/consul \ && chmod +x /usr/local/bin/consul \
&& chmod +x /usr/local/bin/curl-unix-socket && 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> MAINTAINER Jessica Frazelle <jess@docker.com>
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
build-essential \ build-essential \
ca-certificates \ ca-certificates \
curl \ curl \
git \
libasound2 \ libasound2 \
libgconf-2-4 \ libgconf-2-4 \
libgnome-keyring-dev \ libgnome-keyring-dev \
@@ -13,18 +24,26 @@ RUN apt-get update && apt-get install -y \
libpci3 \ libpci3 \
libxtst6 \ libxtst6 \
unzip \ unzip \
zip \
--no-install-recommends --no-install-recommends
ENV HOME /home/user
RUN useradd --create-home --home-dir $HOME user \
&& chown -R user:user $HOME
# install node # install node
RUN curl -sL https://deb.nodesource.com/setup | bash - RUN curl -sL https://deb.nodesource.com/setup | bash -
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
nodejs \ nodejs \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/* \
&& npm update -g
# download the source # download the source
RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/VSCode-linux-x64.zip -o /tmp/vs.zip \ RUN curl -sSL https://jesss.s3.amazonaws.com/binaries/VSCode-linux-x64.zip -o /tmp/vs.zip \
&& unzip /tmp/vs.zip -d /usr/src/ \ && 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