forked from holman/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: #4
- Loading branch information
Derek Michael Frank
committed
Oct 15, 2016
1 parent
3fcbaa8
commit 0ab5c0c
Showing
4 changed files
with
77 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*~ | ||
.DS_Store | ||
.git/ | ||
.gitignore | ||
venv*/ | ||
*/.git/ | ||
*/.gitignore | ||
*/venv*/ |
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,27 @@ | ||
FROM alpine:3.4 | ||
|
||
MAINTAINER Derek M. Frank <derekmfrank at gmail dot com> | ||
|
||
USER root | ||
|
||
# Install dependencies. | ||
RUN apk update && apk add \ | ||
bash \ | ||
git \ | ||
zsh | ||
|
||
# Add user. | ||
ENV HOME "/home/dot" | ||
ENV SHELL "/bin/zsh" | ||
ENV USER dot | ||
RUN adduser -h $HOME -s "$SHELL" -S -D "$USER" | ||
|
||
# Setup app. | ||
ENV DOTFILES "$HOME/.dotfiles" | ||
WORKDIR "$DOTFILES" | ||
COPY . "$DOTFILES" | ||
RUN chown -R "$USER" "$DOTFILES" | ||
|
||
USER "$USER" | ||
ENTRYPOINT ["./test/entrypoint.sh"] | ||
CMD ["docker"] |
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
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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd "$(dirname "$0")/.." | ||
source 'script/bootstrap' | ||
|
||
NAME="$(uname -s)" | ||
RELEASE="$(uname -r)" | ||
|
||
if ([[ "$RELEASE" = *'boot2docker' ]] || [[ "$RELEASE" = *'moby' ]]) && \ | ||
[[ "$1" = 'docker' ]] ; then | ||
echo | ||
echo 'You are using docker!' | ||
echo 'I will assume bootstrap is being run as an entrypoint...' | ||
echo | ||
|
||
if [[ "$SHELL" != *'zsh' ]]; then | ||
SHELL="$(which zsh)" | ||
fi | ||
exec "$SHELL" -li | ||
fi |