Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f9f3626
rm duplicates added rsync
growlf Dec 19, 2023
a3bd584
added bzip, pw10 theme ownership, and consistant ADD over COPY
growlf Dec 19, 2023
e117678
adding ownership and history plugin as well as rc files
growlf Dec 20, 2023
a0d2197
codespace font setting
growlf Dec 20, 2023
c819c5a
Coder (#6)
growlf Dec 29, 2023
33d3eb4
Merge branch 'main' into develop
growlf Dec 29, 2023
127dd24
changed from app to dev container name
growlf Dec 29, 2023
ae00af2
fixed indent filure
growlf Dec 29, 2023
41e6be4
indenting
growlf Dec 29, 2023
81010f7
versioning test
growlf Dec 29, 2023
85548b0
removed bad version test
growlf Dec 29, 2023
e18eeb3
added Docker test tasks
growlf Dec 31, 2023
a5a92d3
added docker test tasks
growlf Dec 31, 2023
6f1560b
Merge branch 'main' into develop
growlf Dec 31, 2023
e662fbb
added example bash script to basic-test network
growlf Feb 9, 2024
cba107e
Added test_net and docs
growlf Feb 9, 2024
a957d3d
Merge branch 'main' into develop
growlf Feb 9, 2024
d219084
Merge branch 'main' into develop
growlf Feb 11, 2024
fe42cb9
added ansible tool
growlf Feb 11, 2024
d2418eb
Adding ansible (#15)
growlf Feb 11, 2024
fc9bc32
new tools added in dockerfile2
Feb 13, 2024
5dacf40
Merge pull request #80 from emiko47:personal
growlf Feb 15, 2024
9786dfd
added new colors in test_net.sh (#145)
cotill Feb 25, 2024
4565532
Updated README file to be more descriptive (#141)
mahamjamal Feb 25, 2024
9953c96
Remove starship, re-add autoremove (#147)
CDEguia Feb 25, 2024
dbc3260
Merge branch 'main' into develop
Feb 26, 2024
f55b27e
Update Develop from main (#149)
growlf Feb 26, 2024
b827914
adds pytest to the dev container, and updates the setting file to inc…
CDEguia Nov 18, 2024
3ab798b
Update from development branch (#153)
growlf Nov 18, 2024
9b41f22
updated to new name convention and removed deprecated version string
growlf Nov 18, 2024
64711cb
changed from character based to numeric chmod
growlf Nov 18, 2024
70cd7ec
removed build context
growlf Nov 18, 2024
bdfb4c7
Merge branch 'develop'
growlf Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
"installTools": true,
"version": "3.11"
},
"ghcr.io/warrenbuckley/codespace-features/sqlite:1": {}
"ghcr.io/warrenbuckley/codespace-features/sqlite:1": {},
"ghcr.io/hspaans/devcontainer-features/pytest:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
"forwardPorts": [
8000
]
],

// Uncomment the next line if you want start specific services in your Docker Compose config.
// "runServices": [],
Expand All @@ -50,7 +51,7 @@
// "shutdownAction": "none",

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",
"postCreateCommand": "cat /etc/os-release"

// Configure tool-specific properties.
// "customizations": {},
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"editor.fontFamily": "'MesloLGS NF', 'Droid Sans Mono', 'monospace', monospace"
"editor.fontFamily": "'MesloLGS NF', 'Droid Sans Mono', 'monospace', monospace",
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
29 changes: 18 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,28 @@ RUN apt-get -yq install --no-install-recommends \
tcpdump traceroute iproute2 dnsutils whois mtr iftop iputils-ping wget nmap netcat-traditional \
procps \
htop \
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
screen tmux \
unzip zip \
jq \
build-essential \
software-properties-common \
tree \
lsof \
fish \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# ensure that there is a place to mount the host files
RUN mkdir /host

# Set tthe working directory for installations and login
# Set the working directory for installations and login
WORKDIR /app

# Copy in any/all additional files from our project
ADD src/requirements.txt .

# Istall Python basic libraries
# Install Python basic libraries
RUN python3 -m pip install --no-cache-dir -r requirements.txt

# Setup a user to match the host and reduce the frustration/confusion of file ownership
Expand All @@ -59,7 +66,7 @@ RUN echo $GIT_VERSION_HASH > GIT_VERSION_HASH.txt
USER $USERNAME

# Install ZSH, OhMyZSH, themes and plugins
ADD --chown=1000:1000 --chmod=+x src/zsh-in-docker.sh .
COPY --chown=1000:1000 --chmod='0755' src/zsh-in-docker.sh .
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN ./zsh-in-docker.sh \
-p git \
Expand All @@ -85,11 +92,11 @@ ADD --chown=1000:1000 src/.p10k.zsh /home/$USERNAME/.p10k.zsh
ADD --chown=1000:1000 src/.zshrc /home/$USERNAME/.zshrc
ADD --chown=1000:1000 src/.p10k.zsh /home/$USERNAME/.p10k.zsh

ADD --chown=1000:1000 --chmod=+x src/tasks.py .
ADD --chown=1000:1000 --chmod=+x https://private-sw-downloads.s3.amazonaws.com/archfx_broker/preflight/broker_preflight.sh .
ADD --chown=1000:1000 --chmod='0755' src/tasks.py .
ADD --chown=1000:1000 --chmod='0755' https://private-sw-downloads.s3.amazonaws.com/archfx_broker/preflight/broker_preflight.sh .

ADD --chown=1000:1000 --chmod=+x src/test_net.sh .
ADD --chown=1000:1000 --chmod='0755' src/test_net.sh .
ADD --chown=1000:1000 src/nodes.list .

# Set default command
CMD ["/bin/zsh"]
CMD ["/bin/zsh"]
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can find more at:

## Batteries included

### Custom Shell
### Custom Shell

Using the `docker-compose.yml` file (included) makes certain tasks easier. For example, opening a self-removing ZShell instance can be done lke so:

Expand All @@ -41,13 +41,13 @@ Using `tcpdump` can either be done from within a shell of the toolbox container,

docker run --rm -it --net=host ghcr.io/growlf/toolbox sudo tcpdump

### Running scripts and commands
### Running scripts and commands

You can also run arbitrary commands and scripts directly from the commandline like so:

docker compose run --rm -it app1 ./test_net.sh

## Invoke
## Using the Invoke Command

This image implements [Python Invoke](https://www.pyinvoke.org/), for managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks. There are a few basic tasks defined as examples already.

Expand Down Expand Up @@ -86,3 +86,4 @@ Use the `portainer-compose.yml` file and modify to your hearts content.
- https://pypi.org/project/portscan/
- https://docs.pyinvoke.org/en/stable/
- https://docker-py.readthedocs.io/en/stable/

10 changes: 10 additions & 0 deletions ansible/inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
myhosts:
hosts:
localhost:
ansible_host: localhost
server1:
ansible_host: server1
server2:
ansible_host: server2
server3:
ansible_host: nexus
1 change: 0 additions & 1 deletion docker-compose.yml → compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:

# Building and testing environment
Expand Down
3 changes: 0 additions & 3 deletions portainer-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ services:

# Building and testing environment
app:
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/growlf/toolbox:testing
stdin_open: true
tty: true
Expand Down
1 change: 1 addition & 0 deletions src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ portscan==1.1
pyfiglet==1.0.2
speedtest-cli==2.1.3
urllib3==2.1.0
ansible==9.2.0
3 changes: 3 additions & 0 deletions src/test_net.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ if test -t 1; then
magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)"
white="$(tput setaf 7)"
orange="$(tput setaf 208)"
purple="$(tput setaf 135)"

fi
fi

Expand Down