-
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
3cc9896
commit e83887e
Showing
7 changed files
with
176 additions
and
1 deletion.
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,29 @@ | ||
name: Docker Hub Description | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/docs/**" | ||
- ".github/workflows/docker-hub-description.yml" | ||
|
||
jobs: | ||
docker-hub: | ||
runs-on: ubuntu-latest | ||
name: Docker Hub Update | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Docker Hub Description | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ vars.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
repository: macabrequinox/zshbuntu | ||
short-description: "Your Ultimate Ubuntu Image with Zsh Magic!" | ||
readme-filepath: "./zshbuntu/docs/README.md" |
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,71 @@ | ||
name: Docker Image Build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "*" | ||
- "**/docs/**" | ||
- ".github/**" | ||
- "!.github/workflows/docker-image-build.yml" | ||
|
||
concurrency: docker_image_build_${{ github.ref }} | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
name: Docker Build and Push | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ vars.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- id: metadata | ||
name: Compute Metadata | ||
run: | | ||
echo "current_date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_OUTPUT | ||
echo "git_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT | ||
- id: zshbuntu | ||
name: Build zshbuntu | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: zshbuntu/ | ||
no-cache: true | ||
push: true | ||
tags: ${{ vars.DOCKERHUB_USERNAME }}/zshbuntu:latest,${{ vars.DOCKERHUB_USERNAME }}/zshbuntu:${{ steps.metadata.outputs.git_tag }} | ||
platforms: linux/amd64,linux/arm64/v8 | ||
labels: | | ||
org.opencontainers.image.title=zshbuntu | ||
org.opencontainers.image.url=${{ github.repositoryUrl }} | ||
org.opencontainers.image.version=${{ steps.metadata.outputs.git_tag }} | ||
org.opencontainers.image.created=${{ steps.metadata.outputs.current_date }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
- name: Summary | ||
run: | | ||
{ | ||
echo -e "Image: zshbuntu:${{ steps.metadata.outputs.git_tag }}\n" | ||
echo '<details>' | ||
echo '<summary>Metadata</summary>' | ||
echo -e '\n```' | ||
echo -e "${{ steps.zshbuntu.outputs.metadata }}" | ||
echo -e '```' | ||
echo '</details>' | ||
echo -e '\n' | ||
} >> $GITHUB_STEP_SUMMARY |
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 @@ | ||
.idea |
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,2 +1,2 @@ | ||
# docker-images | ||
# Docker Images | ||
Ultimate docker images for increased productivity |
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,28 @@ | ||
ARG UBUNTU_VERSION=23.04 | ||
FROM ubuntu:${UBUNTU_VERSION} | ||
|
||
RUN apt update | ||
RUN apt install -y zsh sudo systemd vim iputils-ping curl && \ | ||
# apt install -y python3 pip && \ | ||
apt install -y git tig | ||
|
||
# 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 ZSHbuntu – Your Ultimate Ubuntu Image with Zsh Magic! | ||
|
||
Discover a world of command-line sophistication with our ZSHbuntu Docker image. We've curated the perfect Ubuntu 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, ZSHbuntu empowers you with a captivating, efficient, and fun command-line experience. Download now and unlock the full potential of your Ubuntu-based containers. | ||
|
||
<img src="https://raw.githubusercontent.com/snigdhasjg/docker-images/main/zshbuntu/docs/terminal.png" width="512" alt="Terminal Example"> | ||
|
||
## Key Features: | ||
|
||
- Ubuntu 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, systemd, vim, iputils-ping, curl, git, tig | ||
|
||
## How to Use ZSHbuntu | ||
|
||
### Run the ZSHbuntu 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 zshbuntu-sandbox:/home/sandbox --rm -it macabrequinox/zshbuntu | ||
``` | ||
- Along with running the container, this command creates a docker volume named `zshbuntu-sandbox`. | ||
- This command starts the ZSHbuntu 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 ZSHbuntu 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 `zshbuntu-sandbox` volume for future use. | ||
|
||
### To Have a Fresh Start Again: | ||
- reset all settings just delete the `zshbuntu-sandbox` volume by running the following command: | ||
```shell | ||
docker volume rm zshbuntu-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/zshbuntu) by editing the [Dockerfile](https://github.com/snigdhasjg/docker-images/tree/main/zshbuntuDockerfile) | ||
|
||
--- | ||
Tags: #Ubuntu #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.