Giter Club home page Giter Club logo

defcondockerfiles's Introduction

Defcon Dockerfiles

Docker commands

To build:

docker build -t container-image-name .

To enter Docker container as root:

docker exec -u 0 -it <container-name> /bin/bash

To run Docker container:

docker run --name defcon --restart=unless-stopped -d -p 5001(host-port):22(container-port) public.ecr.aws/m3r2m1y9/defcondev-server:latest(image name)

To SSH:

ssh -p <host-port> <username>@host-ip

To enter Virtual machine: cd into folder containing .pem file to access instance

ssh -i "defcon-vm.pem" ec2-user@<ec2-instance-IP>
ssh user@ip_address

Live logging:

For monitoring logged in IP and resource usage:

w
who -Ha
top
ps aux

Live tailing

cd into user directory

tail -10f .bash_history | awk -W interactive '/^#/{printf "%-4d [%s] %s ", ++n, strftime("%F %T", substr($0, 2)), ENVIRON["PWD"];next}; 1'

add alias as follows:

alias monitor='tail -10f ~/.bash_history | awk -W interactive "/^#/{printf \"%-4d [%s] %s \", ++n, strftime(\"%F %T\", substr(\$0, 2)), ENVIRON[\"PWD\"];next}; 1"'

Tmux Config

nano $HOME/.tmux.conf

Config

set -g prefix `
set -g base-index 1              # start indexing windows at 1 instead of 0
set -g detach-on-destroy off     # don't exit from tmux when closing a session
set -g escape-time 0             # zero-out escape time delay
set -g history-limit 1000000     # increase history size (from 2,000)
set -g renumber-windows on       # renumber all windows when any window is closed
set -g set-clipboard on          # use system clipboard

bind d detach
bind r command-prompt "rename-window %%"
bind R source-file ~/.tmux.conf
bind ^A last-window
bind ^W list-windows
bind w list-windows
bind z resize-pane -Z
bind s split-window
bind h split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind '"' choose-window
bind : command-prompt
bind x kill-pane
bind c swap-pane -D
bind S choose-session

Reload tmux config inside tmux session:

tmux ls
tmux
Ctrl + B + :
"source-file ./.tmux.conf"

Attach to existing session

tmux attach

Packages Published.

defcondockerfiles's People

Contributors

rycerzes avatar sourasishbasu avatar sankalpx5 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.