Skip to content

Commit

Permalink
update consul
Browse files Browse the repository at this point in the history
Signed-off-by: Jessica Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Jun 9, 2015
1 parent 9f41315 commit 33f6109
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 33 deletions.
44 changes: 23 additions & 21 deletions bashrc
Original file line number Diff line number Diff line change
@@ -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 \
"$@"
}
19 changes: 12 additions & 7 deletions consul/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM debian:jessie
MAINTAINER Jessica Frazelle <[email protected]>

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 \
unzip \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& 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

# 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
Expand Down
29 changes: 24 additions & 5 deletions visualstudio/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>

RUN apt-get update && apt-get install -y \
build-essential \
ca-certificates \
curl \
git \
libasound2 \
libgconf-2-4 \
libgnome-keyring-dev \
Expand All @@ -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

COPY start.sh /usr/local/bin/start.sh
WORKDIR $HOME

ENTRYPOINT [ "/usr/src/VSCode-linux-x64/Code" ]
ENTRYPOINT [ "/usr/local/bin/start.sh" ]
3 changes: 3 additions & 0 deletions visualstudio/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

su user -c code

0 comments on commit 33f6109

Please sign in to comment.