hychan48 / devcontainer

VSCode Docker Dev Container
GNU General Public License v3.0
2 stars 0 forks source link

Hychan48's Dev Container

devcontainer build --workspace-folder . --image-name jchan48h/devcontainer:dev devcontainer up --id-label name=val --workspace-folder . --remove-existing-container # force and no detach... devcontainer exec --id-label name=val --workspace-folder . "zsh"

todo launch / attach... need command for that. and fix the container

git config --global --add safe.directory /workspaces/devcontainer

git submodule init git submodule update git-submodule --help

git config --global --list

git submodule deinit test/bats git submodule deinit -f test/bats git submodule deinit -f test/test_helper/bats-assert git submodule deinit -f test/test_helper/bats-support

can't do this in the devcontainer

git submodule add https://github.com/bats-core/bats-core.git test/bats git submodule add https://github.com/bats-core/bats-support.git test/test_helper/bats-support git submodule add https://github.com/bats-core/bats-assert.git test/test_helper/bats-assert

git clone --recurse-submodules

if cloned already

git submodule update --init

or

git submodule update --init --recursive

git config --global core.filemode false git config --global core.filemode

# Exists
* [x] Rsync
* [x] wget
* [x] curl
* [x] ssh
* [x] git
* [x] python3
* [ ] network
  * [x] ifconfig
  * [x] ip
* [ ] node
* [ ] pipx
* [ ] nginx
* [ ] sshd
* [ ] sudo -e
* [ ] tmux
  * screen
* [ ] systemctl (negative...)
* other cat
* wsl seems beter tbh

## Backlog
* $profile
* ahk / other key bindings
* wsl
  * xeyes / gui
* other ssh stuff like config

## VSCode Docker Dev Container
* https://hub.docker.com/repository/docker/jchan48h/deb-network/general
  * old one
* try Packer?

## push fixme / test
* use f1 to launch devcontainer to try?

```txt
.
├── .devcontainer
│   ├── devcontainer.json
│   └── Dockerfile
├── .vscode
│   ├── extensions.json
│   └── settings.json
├── src
│   └── ...
└── README.md

Generate tree

mkdir -p .devcontainer
code .devcontainer/devcontainer.json
code .devcontainer/Dockerfile
# cygwin in the wrong place...

# F1 command
docker build --pull --rm -f ".devcontainer\Dockerfile" -t devcontainer:latest ".devcontainer"
docker container ls --all

docker run -it --rm devcontainer:latest ".devcontainer" --name dc --hostname dc ".devcontainer"

docker image ls
 ## oh did i use my debian.,, why is it installing docker

# add docker profiles
## should add some bash / powershell aliases
# macro deck?

docker image ls | grep container

docker run -d devcontainer:latest
docker run -d --name devcontainer-0 devcontainer:latest bash
docker rm devcontainer-0 -f
docker start devcontainer-0

docker container ls
docker container ls --all

docker container prune -f

docker container ls

File locations

{

  // "git.path": "C:\\Program Files\\Git\\cmd\\git.exe",
  "git.path": "C:\\Program Files\\Git\\cmd\\git.exe",
    "liveServer.settings.AdvanceCustomBrowserCmdLine": "",
    // "remote.SSH.path": "C:\\cygwin64\\bin\\ssh.exe"
    // "remote.SSH.path": "C:\\Program Files\\OpenSSH-Win64\\ssh.exe",
        "remote.SSH.path": "c:/progra~1/Git/cmd/git.exe",
        "remote.SSH.path": "C:\\Program Files\\OpenSSH-Win64\\sshd.exe",

}
Could not connect to ssh-agent on local host (\\.\pipe\openssh-ssh-agent). Make sure the service is running.

Plugins of Interest

Docker Run

# hychan48 -> jchan48h
docker pull jchan48h/devcontainer:latest
# docker run -it --rm --name devcontainer -v $(pwd):/home/devcontainer/project jchan48h/devcontainer:latest

On new User

# non docker

Git submodule bats

git config --global --add safe.directory /workspaces/devcontainer git config --global auto.crlf input # this one is fake git config --global core.autocrlf input # this one...

submodule name

rmdir -force test git.exe reset --hard git.exe status

this is one time

git submodule update --init --recursive

this updates? dont run these

git submodule update --remote --merge