Create devcontainer.

This commit is contained in:
Cody Taylor
2023-11-14 22:34:32 -05:00
parent a577e2bbd1
commit ac5e9be5bb
2 changed files with 38 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
FROM mcr.microsoft.com/devcontainers/rust:1-1-bullseye
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
p7zip-full \
&& rm -rf /var/lib/apt/lists/*
ARG USERNAME=vscode
USER $USERNAME
# Save command line history
RUN echo "export HISTFILE=/home/$USERNAME/commandhistory/.bash_history" >> "/home/$USERNAME/.bashrc" \
&& echo "export PROMPT_COMMAND='history -a'" >> "/home/$USERNAME/.bashrc" \
&& mkdir -p /home/$USERNAME/commandhistory \
&& touch /home/$USERNAME/commandhistory/.bash_history \
&& chown -R $USERNAME /home/$USERNAME/commandhistory
+22
View File
@@ -0,0 +1,22 @@
{
"name": "GyroFlow",
"build": {
"dockerfile": "Dockerfile"
},
"mounts": [
"source=gyroflow-bashhistory-${devcontainerId},target=/home/vscode/commandhistory,type=volume"
],
"customizations": {
"vscode": {
"settings": {
"dev.containers.mountWaylandSocket": true,
"terminal.integrated.defaultProfile.linux": "bash"
}
}
},
// "postCreateCommand": "sudo apt update && just install-deps",
"features": {
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/guiyomh/features/just:0": {}
}
}