-
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.
- Loading branch information
1 parent
1e74a5f
commit 08e512c
Showing
6 changed files
with
118 additions
and
6 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
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,29 @@ | ||
ARG AMAZON_LINUX_VERSION=2023 | ||
FROM amazonlinux:${AMAZON_LINUX_VERSION} | ||
|
||
RUN yum update | ||
RUN yum install -y zsh sudo vim iputils tar && \ | ||
# apt install -y python3 pip && \ | ||
yum install -y git tig && \ | ||
yum clean all | ||
|
||
# Creating user | ||
RUN useradd -rm -d /home/sandbox -s /usr/bin/zsh -g root -G root -u 1001 sandbox && \ | ||
echo "sandbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/sudoers | ||
|
||
USER sandbox | ||
WORKDIR /home/sandbox | ||
|
||
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | ||
RUN git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions && \ | ||
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting && \ | ||
git clone --depth=1 https://github.com/akarzim/zsh-docker-aliases.git ~/.oh-my-zsh/custom/plugins/zsh-docker-aliases && \ | ||
sed -i 's/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-docker-aliases)/' .zshrc && \ | ||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k && \ | ||
sed -i 's|ZSH_THEME=.*|ZSH_THEME="powerlevel10k/powerlevel10k"|' .zshrc | ||
|
||
RUN git config --global init.defaultBranch main && \ | ||
git config --global user.name "Ubuntu Sandbox" && \ | ||
git config --global user.email "[email protected]" | ||
|
||
CMD ["zsh"] |
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,46 @@ | ||
Welcome to ZSHmazon – Your Ultimate AmazonLinux Image with Zsh Magic! | ||
|
||
Discover a world of command-line sophistication with our ZSHmazon Docker image. We've curated the perfect AmazonLinux environment enhanced with the power of Zsh, Oh-My-Zsh. Elevate your terminal experience with this feature-packed image, designed to boost your productivity and style. | ||
|
||
Whether you're a developer, system administrator, or terminal enthusiast, ZSHmazon empowers you with a captivating, efficient, and fun command-line experience. Download now and unlock the full potential of your AmazonLinux-based containers. | ||
|
||
<img src="https://raw.githubusercontent.com/snigdhasjg/docker-images/main/zshmazon/docs/terminal.png" width="512" alt="Terminal Example"> | ||
|
||
## Key Features: | ||
|
||
- AmazonLinux base with [Zsh](https://en.wikipedia.org/wiki/Z_shell) magic. | ||
- [Oh-My-Zsh](https://ohmyz.sh) for enhanced shell capabilities. | ||
- [Powerlevel10k](https://github.com/romkatv/powerlevel10k) for eye-catching, customizable prompts. | ||
- [Syntax highlighting](https://github.com/zsh-users/zsh-syntax-highlighting) for code clarity. | ||
- Vibrant [auto-suggestions](https://github.com/zsh-users/zsh-autosuggestions) for faster typing. | ||
- [Zsh Docker Aliases](https://github.com/akarzim/zsh-docker-aliases) for streamlined container management. | ||
|
||
## Modules Installed | ||
zsh, sudo, vim, tar, iputils, git, tig | ||
|
||
## How to Use ZSHmazon | ||
|
||
### Run the ZSHmazon Docker Sandbox: | ||
- To run the Docker image with the previously created volume mounted to `/home/sandbox` for the user `sandbox`, use the following command: | ||
```shell | ||
docker run --name sandbox -v zshmazon-sandbox:/home/sandbox --rm -it macabrequinox/zshmazon | ||
``` | ||
- Along with running the container, this command creates a docker volume named `zshmazon-sandbox`. | ||
- This command starts the ZSHmazon Docker container, providing you with a secure and permission-free environment to run commands and experiment. | ||
- Once you exit, it automatically deletes the container instance. | ||
|
||
Now you're ready to enjoy your ZSHmazon Docker Sandbox, where you can safely execute commands without worrying about permissions or security issues. | ||
Feel free to customize your environment and configurations within the sandbox, and any changes on home directory will be stored in the `zshmazon-sandbox` volume for future use. | ||
|
||
### To Have a Fresh Start Again: | ||
- reset all settings just delete the `ZSHmazon-sandbox` volume by running the following command: | ||
```shell | ||
docker volume rm zshmazon-sandbox | ||
``` | ||
- This volume was storing your configuration and setups of docker image's home directory. | ||
|
||
## Contribute | ||
On [GitHub](https://github.com/snigdhasjg/docker-images/tree/main/zshmazon) by editing the [Dockerfile](https://github.com/snigdhasjg/docker-images/tree/main/zshmazon/Dockerfile) | ||
|
||
--- | ||
Tags: #AmazonLinux #Zsh #OhMyZsh #Powerlevel10k #SyntaxHighlighting #AutoSuggestions #DockerImage #CommandLine #DeveloperTools #Productivity |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.