-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfa19a8
commit b85fa53
Showing
4 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# See here for image contents: | ||
# https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile | ||
ARG VARIANT="3.11" | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | ||
ARG INSTALL_NODE="true" | ||
ARG NODE_VERSION="lts/*" | ||
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
USER vscode | ||
RUN pip3 --disable-pip-version-check --no-cache-dir install -U \ | ||
'poetry==1.1.13' \ | ||
'pip==22.1.2' | ||
# prevent homebrew from updating or upgrading to save time | ||
ENV HOMEBREW_NO_AUTO_UPDATE=1 | ||
ENV HOMEBREW_NO_INSTALL_UPGRADE=1 | ||
|
||
WORKDIR /tmp | ||
RUN curl \ | ||
-Lk \ | ||
'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' \ | ||
--output vscode_cli.tar.gz | ||
RUN sudo rm /usr/local/bin/code | ||
RUN sudo tar -xf vscode_cli.tar.gz -C /usr/local/bin | ||
|
||
ENV TUNNEL_NAME=runpod | ||
ENV VSCODE_CLI_USE_FILE_KEYCHAIN=true | ||
|
||
WORKDIR /home/vscode | ||
|
||
COPY ./vm/start.sh /etc/start.sh | ||
CMD /etc/start.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "VM Devcontainer", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "..", | ||
"args": { | ||
"VARIANT": "3.11", | ||
"INSTALL_NODE": "true", | ||
"NODE_VERSION": "18.7" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"python.pythonPath": "/usr/local/bin/python" | ||
}, | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/starship:1": {}, | ||
"ghcr.io/devcontainers/features/github-cli:1": { | ||
}, | ||
}, | ||
"mounts": [ | ||
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached", | ||
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zsh_history,target=/home/vscode/.zsh_history,type=bind,consistency=cached", | ||
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshrc,target=/home/vscode/.zshrc,type=bind,consistency=cached", | ||
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshenv,target=/home/vscode/.zshenv,type=bind,consistency=cached", | ||
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/starship.toml,target=/home/vscode/.config/starship.toml,type=bind,consistency=cached", | ||
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/gh,target=/home/vscode/.config/gh,type=bind,consistency=cached", | ||
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached", | ||
], | ||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -e -u -o pipefail -x | ||
|
||
[ "$(stat -c %U .)" = "root" ] && sudo chown vscode:vscode /home/vscode | ||
|
||
yes | \ | ||
code tunnel \ | ||
--accept-server-license-terms \ | ||
--name ${TUNNEL_NAME} \ | ||
--cli-data-dir /home/vscode/.vscode-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Pytest | ||
on: | ||
workflow_dispatch: {} | ||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install -g @devcontainers/[email protected] | ||
- run: | | ||
set -e -x -u -o pipefail | ||
repo=ghcr.io/treebeardtech/dev-images; tag=latest | ||
docker pull hello-world | ||
docker tag hello-world $repo:$tag | ||
# devcontainer build \ | ||
# --workspace-folder . \ | ||
# --config .devcontainer/vm/devcontainer.json \ | ||
# --image-name $repo:$tag | ||
docker push $repo:$tag |