From 2899011c73a2fbbba64b63d2108a17a6f727e523 Mon Sep 17 00:00:00 2001 From: Jev Date: Fri, 31 May 2024 20:32:34 +0200 Subject: [PATCH] removed devcontainer --- .devcontainer/Dockerfile | 72 ------------------------- .devcontainer/devcontainer.json | 26 --------- .devcontainer/devcontainer.json.license | 3 -- .devcontainer/prepare_host.sh | 25 --------- .devcontainer/requirements.txt | 13 ----- .devcontainer/requirements.txt.license | 3 -- 6 files changed, 142 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json delete mode 100644 .devcontainer/devcontainer.json.license delete mode 100755 .devcontainer/prepare_host.sh delete mode 100644 .devcontainer/requirements.txt delete mode 100644 .devcontainer/requirements.txt.license diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index ae57ec4..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Jev Kuznetsov, ROX Automation -# -# SPDX-License-Identifier: MIT - -# note: using 3.11 because pre-commit is not compatible with 3.12 -FROM python:3.11-slim - -ARG USERNAME=dev -ARG UID=1000 -ARG GID=1000 -ARG VERSION="circup-dev" - -# Create the user -RUN groupadd --gid $GID $USERNAME \ - && useradd --uid $UID --gid $GID -m $USERNAME \ - # - # [Optional] Add sudo support. Omit if you don't need to install software after connecting. - && apt-get update \ - && apt-get install -y sudo \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ - && chmod 0440 /etc/sudoers.d/$USERNAME - -# dialout group -RUN usermod -a -G dialout $USERNAME - -# install packages -RUN apt-get install -y \ - locales \ - tree \ - git \ - iputils-ping - -# cleanup -RUN rm -rf /var/lib/apt/lists/* - -# set locale -RUN export LC_ALL=en_US.UTF-8 -RUN export LANG=en_US.UTF-8 -RUN locale-gen en_US.UTF-8 - -RUN pip install --upgrade pip - - -USER ${USERNAME} -RUN echo 'export PS1="🐍 \[\033[1;36m\]'"${VERSION}"' \[\e[33m\]\W\[\e[m\] \[\033[1;36m\]# \[\033[0m\]"' >> ~/.bashrc - -# add local bin to path -RUN echo "export PATH=\$PATH:/home/${USERNAME}/.local/bin" >> ~/.bashrc -ENV PATH="${PATH}:/home/${USERNAME}/.local/bin" - -WORKDIR /home/${USERNAME} - - -# setup folders for saving vscode extensions -# https://code.visualstudio.com/remote/advancedcontainers/avoid-extension-reinstalls -RUN mkdir -p /home/$USERNAME/.vscode-server/extensions \ - && chown -R $USERNAME \ - /home/$USERNAME/.vscode-server - - -# install requirements -COPY requirements.txt requirements.txt -RUN pip3 install -r requirements.txt && rm requirements.txt - - -# build timestamp -USER root -RUN echo ${VERSION} >> /build_date.txt && \ - date >> /build_date.txt - -USER ${USERNAME} -WORKDIR /home/${USERNAME} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index ba81979..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "initializeCommand": ".devcontainer/prepare_host.sh", // executed on HOST system - "image": "local/circup-dev", - - "mounts": [ - "source=/var/tmp/container-extensions,target=/home/dev/.vscode-server/extensions,type=bind,consistency=cached" - ], - "postCreateCommand": "pip install -e '.[dev]'", - - - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "ms-python.python", - "ms-python.vscode-pylance", - "shardulm94.trailing-spaces", - "njpwerner.autodocstring", - "mhutchie.git-graph", - "doi.fileheadercomment", - "donjayamanne.githistory", - "charliermarsh.ruff" - ] - } - } -} diff --git a/.devcontainer/devcontainer.json.license b/.devcontainer/devcontainer.json.license deleted file mode 100644 index bf43ac1..0000000 --- a/.devcontainer/devcontainer.json.license +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Jev Kuznetsov, ROX Automation -# -# SPDX-License-Identifier: MIT diff --git a/.devcontainer/prepare_host.sh b/.devcontainer/prepare_host.sh deleted file mode 100755 index 09e4317..0000000 --- a/.devcontainer/prepare_host.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2024 Jev Kuznetsov, ROX Automation -# -# SPDX-License-Identifier: MIT - - -# this script prepares the host for the devcontainer. - - -# it is easier to use this script to pre-build the image, instead of using -# `build` directive in `devcontainer.json`. Less chance of errors ducing container start. - -IMG_NAME="local/circup-dev" -# Get the directory of the script -SCRIPT_DIR=$(dirname "$0") - -# create a directory for the container extensions to avoid reinstallation -# on container rebuild. Mounted inside devcontainer. -mkdir -p /var/tmp/container-extensions - - -# buld image -echo "Building image $IMG_NAME" -docker build -t $IMG_NAME --build-arg UID=$(id -u) --build-arg GID=$(id -g) -f $SCRIPT_DIR/Dockerfile $SCRIPT_DIR diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt deleted file mode 100644 index 738f2c2..0000000 --- a/.devcontainer/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -bump2version -coverage -invoke -ipython -mypy -pre-commit -pytest -pytest-asyncio -pytest-cov -pytest-coverage -pytest-faulthandler -pytest-random-order -ruff diff --git a/.devcontainer/requirements.txt.license b/.devcontainer/requirements.txt.license deleted file mode 100644 index bf43ac1..0000000 --- a/.devcontainer/requirements.txt.license +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Jev Kuznetsov, ROX Automation -# -# SPDX-License-Identifier: MIT