-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add linux compatibility (#147)
* feat: add Dockerfile for testing linux install * feat: add shell and terminfo installer commands * refactor: decouple insalled location from installation/zsh * fix: only alias vim to nvim if nvim is installed * fix: change zsh path from brew to zsh if brew no installed * refactor: change '! -z' to '-n' * feat: add all option to installer * fix: add backup and macos to installer script * fix: create ~/.vim-tmp on shell start * refactor: rename installer to install.sh and remove install directory * fix dotfiles path issue in zshenv * fix(install): clean duplicated and misspelled code * refactor(docker): condense install commands in one * fix(tmux): remove reattach-to-user-namespace * refactor: remove reattach-to-user-namespace as it no longer appears to be necessary. * refactor: remove login-shell as it is no longer required * refactor(git): remove personal info from gitconfig * refactor: remove name, email, and github username from gitconfig. These are now stored in ~/.gitconfig-local, which is outside of version control. * fix(install): set values in local-system config * refactor: rename function to not conflict with actual git * refactor: direct config to ~/.gitconfig-local instead of the global config * feat(install): colorize output of install script * refactor(install): normalize function names * refactor(docker): remove commented out code * feat(zsh): add linuxbrew to path * fix(docker): update apt in Dockerfile * fix(zsh): sourcing homebrew and z.sh * fix(install): show macos warning on linux
- Loading branch information
Showing
14 changed files
with
421 additions
and
455 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
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,32 @@ | ||
FROM ubuntu | ||
|
||
# Update the apt repository | ||
RUN apt update | ||
|
||
# Install dependencies | ||
RUN apt-get update | ||
RUN apt-get install -y build-essential file zsh git sudo ruby curl vim language-pack-en | ||
|
||
# take an SSH key as a build argument | ||
ARG PRIVATE_KEY | ||
ARG PUBLIC_KEY | ||
|
||
# Create a test user | ||
RUN useradd -ms /bin/bash user && \ | ||
echo "user ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/user && \ | ||
chmod 0440 /etc/sudoers.d/user | ||
|
||
USER user:user | ||
|
||
WORKDIR /home/user | ||
RUN touch .bash_profile | ||
RUN mkdir -p .ssh | ||
RUN echo "$PRIVATE_KEY" > .ssh/id_rsa | ||
RUN echo "$PUBLIC_KEY" > .ssh/id_rsa.pub | ||
RUN chmod 600 .ssh/id_rsa | ||
RUN chmod 600 .ssh/id_rsa.pub | ||
RUN ssh-keyscan github.com >> .ssh/known_hosts | ||
|
||
RUN mkdir -p code | ||
|
||
CMD ["/bin/bash"] |
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 was deleted.
Oops, something went wrong.
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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
case "$1" in | ||
start) | ||
docker run -v "$DOTFILES":/home/user/code/dotfiles -it --rm dotfiles | ||
;; | ||
build) | ||
priv_key=$(cat ~/.ssh/id_rsa) | ||
pub_key=$(cat ~/.ssh/id_rsa.pub) | ||
docker build -t dotfiles \ | ||
--force-rm \ | ||
--build-arg PRIVATE_KEY="$priv_key" \ | ||
--build-arg PUBLIC_KEY="$pub_key" \ | ||
"$DOTFILES" | ||
;; | ||
*) | ||
echo $"Usage: $(basename "$0") {start|build}" | ||
;; | ||
esac |
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
Oops, something went wrong.