removed devcontainer

This commit is contained in:
Jev 2024-05-31 20:32:34 +02:00
parent 4e4934f659
commit 2899011c73
6 changed files with 0 additions and 142 deletions

View file

@ -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}

View file

@ -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"
]
}
}
}

View file

@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2024 Jev Kuznetsov, ROX Automation
#
# SPDX-License-Identifier: MIT

View file

@ -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

View file

@ -1,13 +0,0 @@
bump2version
coverage
invoke
ipython
mypy
pre-commit
pytest
pytest-asyncio
pytest-cov
pytest-coverage
pytest-faulthandler
pytest-random-order
ruff

View file

@ -1,3 +0,0 @@
# SPDX-FileCopyrightText: 2024 Jev Kuznetsov, ROX Automation
#
# SPDX-License-Identifier: MIT