Add dev container configuration (#23)
* add devcontainer support files * update rbuild to look in /usr/bin/openscad-nightly for openscad-nightly
This commit is contained in:
19
.devcontainer/devcontainer.json
Normal file
19
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,19 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
|
||||
{
|
||||
"build": { "dockerfile": "dockerfile" },
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/python:1": {
|
||||
"installTools": true,
|
||||
"version": "latest"
|
||||
}
|
||||
},
|
||||
|
||||
"customizations": {
|
||||
},
|
||||
|
||||
"remoteUser": "vscode",
|
||||
"mounts": [
|
||||
"source=rackstack-bashhistory,target=/commandhistory,type=volume"
|
||||
]
|
||||
}
|
||||
21
.devcontainer/dockerfile
Normal file
21
.devcontainer/dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM mcr.microsoft.com/devcontainers/base:bookworm
|
||||
|
||||
RUN wget -qO- https://files.openscad.org/OBS-Repository-Key.pub | sudo tee /etc/apt/trusted.gpg.d/obs-openscad-nightly.asc \
|
||||
&& echo "deb https://download.opensuse.org/repositories/home:/t-paul/Debian_12/ ./" >> /etc/apt/sources.list.d/openscad.list \
|
||||
&& apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get -y install --no-install-recommends openscad openscad-nightly libpng-dev libjpeg-dev libtiff-dev
|
||||
|
||||
|
||||
RUN apt-get -y install --no-install-recommends imagemagick
|
||||
|
||||
RUN curl -sL http://www.lcdf.org/gifsicle/gifsicle-1.91.tar.gz | tar -zx \
|
||||
&& cd gifsicle-1.91 \
|
||||
&& ./configure --disable-gifview \
|
||||
&& make install
|
||||
|
||||
ARG USERNAME=vscode
|
||||
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
|
||||
&& mkdir /commandhistory \
|
||||
&& touch /commandhistory/.bash_history \
|
||||
&& chown -R $USERNAME /commandhistory \
|
||||
&& echo "$SNIPPET" >> "/home/$USERNAME/.bashrc"
|
||||
Reference in New Issue
Block a user