Skip to content

Commit

Permalink
TST: devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchengtkc committed Nov 22, 2023
1 parent 91f5763 commit 1ecdc5c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN DEBIAN_FRONTEND=noninteractive \
libffi-dev \
liblzma-dev

RUN useradd -rm -d /home/vscode -s /bin/bash -g root -G sudo -u 1000 vscode -p ""
USER vscode
WORKDIR /home/vscode
ENV HOME=/home/vscode
# RUN useradd -rm -d /home/vscode -s /bin/bash -g root -G sudo -u 1000 vscode -p ""
# USER vscode
# WORKDIR /home/vscode
# ENV HOME=/home/vscode
ENV PATH="/root/.local/bin:$HOME/.local/bin::$PATH"
RUN curl -sSL https://install.python-poetry.org | python3 -
10 changes: 6 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "warmth dolfinx poetry",
"image": "ghcr.io/equinor/warmth:latest",
"build": {
"dockerfile": "Dockerfile"
},

// 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features.
// "features": {},
Expand All @@ -9,7 +11,7 @@
// "forwardPorts": [],

// 👇 Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash .devcontainer/postCreate.sh",
"postCreateCommand": "poetry config virtualenvs.create false && poetry env use system && poetry install --with dev --no-interaction",

// 👇 Configure tool-specific properties.
"customizations": {
Expand All @@ -27,8 +29,8 @@
"features": {
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
}
},

// 👇 Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"remoteUser": "root"
}
4 changes: 0 additions & 4 deletions .devcontainer/postCreate.sh

This file was deleted.

0 comments on commit 1ecdc5c

Please sign in to comment.