Skip to content

Commit

Permalink
fix: rm docker-ssh & update py-pkgs Makefile target
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
  • Loading branch information
vladdoster committed Jan 14, 2023
1 parent ba4bd35 commit 55422e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.DS_Store
.zcompdump
bin/.local/[si]*
bin/.local/**/python
default_config.cfg
dotfiles-latest.tar.gz
git/**/credentials
Expand Down
22 changes: 4 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ CONTAINER_NAME = vdoster/dotfiles
CONTAINER_TAG = latest
GH_URL = https://github.com/vladdoster
HOMEBREW_URL := https://raw.githubusercontent.com/Homebrew/install/HEAD
PIP_OPTS := --no-compile --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade

DOCKER_OPTS := --interactive --mount=source=dotfiles-volume,destination=/home --security-opt seccomp=unconfined
PIP_OPTS := --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade
PY_PKGS := bdfr beautysh best-of black bpytop flake8 instaloader isort mdformat mdformat-config mdformat-gfm mdformat-shfmt mdformat-tables mdformat-toc pynvim reorder-python-imports pip
STOW_OPTS := --target=$$HOME --verbose=1

Expand All @@ -34,7 +36,6 @@ docker-build: ## Build docker image
docker build \
--compress \
--force-rm \
--no-cache \
--progress plain \
--rm \
--tag=$(CONTAINER_NAME):latest \
Expand All @@ -54,21 +55,6 @@ docker-load: ## Create tarball of docker image
docker-push: ## Build and push dotfiles docker image
make --directory=docker/ manifest

DOCKER_OPTS := --interactive --mount=source=dotfiles-volume,destination=/home --security-opt seccomp=unconfined

docker-ssh: ## Start docker container running SSH
docker run \
$(DOCKER_OPTS) \
--detach \
--publish 2222:22 \
$(CONTAINER_NAME):$(CONTAINER_TAG)
docker exec \
--detach \
--interactive \
$$(docker container ls --latest --quiet) \
sudo service ssh start
$(info --- to ssh into container. run: ssh --port 2222 $$(basename $(CONTAINER_NAME)).localhost)

docker-shell: ## Start shell in docker container
docker run \
--tty \
Expand Down Expand Up @@ -110,7 +96,7 @@ py-pip-install: ## Install pip
python3 -m ensurepip --upgrade

py-pkgs: ## Install python pkgs
python3 -m pip install $(PIP_OPTS) $(PY_PKGS)
python3 -m pip install --prefix $$HOME/.local/bin/python $(PIP_OPTS) $(PY_PKGS)
$(info --- py packages installed)

py-update: py-pkgs ## Update python packages
Expand Down
3 changes: 1 addition & 2 deletions bin/.local/.stow-local-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
\.svn
^/LICENSE.*
^/READMVE.*
# /.local/share
# /.local/state
share/
state/
**/python/

0 comments on commit 55422e2

Please sign in to comment.