forked from jessfraz/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jessica Frazelle <[email protected]>
- Loading branch information
Showing
4 changed files
with
62 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ | ||
"$@" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ | ||
|
@@ -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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
su user -c code |