mirror of https://github.com/lapce/lapce.git
feat: add devcontainer
This commit is contained in:
parent
2caa198bf8
commit
99c96d2395
|
@ -0,0 +1,12 @@
|
|||
[core]
|
||||
editor = code --wait
|
||||
|
||||
[diff]
|
||||
tool = vscode
|
||||
[difftool "vscode"]
|
||||
cmd = code --wait --diff $LOCAL $REMOTE
|
||||
|
||||
[merge]
|
||||
tool = vscode
|
||||
[mergetool "vscode"]
|
||||
cmd = code --wait $MERGED
|
|
@ -0,0 +1,21 @@
|
|||
ARG VARIANT="edge"
|
||||
FROM alpine:${VARIANT}
|
||||
|
||||
ARG UID="1000"
|
||||
ARG USER="lapce"
|
||||
RUN adduser -D ${USER} -u ${UID} && \
|
||||
addgroup ${USER} wheel
|
||||
|
||||
RUN apk add --no-cache doas cargo rust-src freetype-dev \
|
||||
gtk+3.0-dev libgit2-dev libssh2-dev libxcb-dev \
|
||||
libxfixes-dev libxkbcommon-dev openssl-dev python3 \
|
||||
vulkan-loader-dev wayland-dev curl wget alpine-sdk \
|
||||
zsh fish bash less coreutils util-linux
|
||||
|
||||
RUN echo "permit nopass :wheel" > /etc/doas.d/doas.conf
|
||||
|
||||
ENV OPENSSL_NO_VENDOR=1
|
||||
|
||||
USER ${USER}
|
||||
SHELL ["bash"]
|
||||
COPY .gitconfig /home/${USER}/.gitconfig
|
|
@ -0,0 +1,51 @@
|
|||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/alpine
|
||||
{
|
||||
"name": "Alpine",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
// Update 'VARIANT' to pick an Alpine version: 3.13, 3.14, 3.15 (MS lags behind with OS versions, 3.16 is available for few months now)
|
||||
"args": { "VARIANT": "edge" }
|
||||
},
|
||||
|
||||
"containerEnv": {
|
||||
// static linking
|
||||
// "LIBGIT2_STATIC": "1",
|
||||
// "LIBSSH2_STATIC": "1",
|
||||
// "LIBZ_SYS_STATIC": "1",
|
||||
// "OPENSSL_STATIC": "1",
|
||||
// "PKG_CONFIG_ALL_STATIC": "1"
|
||||
},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "uname -a",
|
||||
|
||||
// Replace when using a ptrace-based debugger like C++, Go, and Rust
|
||||
"runArgs": [
|
||||
"--init",
|
||||
"--cap-add=SYS_PTRACE",
|
||||
"--security-opt",
|
||||
"seccomp=unconfined"
|
||||
],
|
||||
|
||||
"extensions": [
|
||||
"EditorConfig.EditorConfig",
|
||||
"esbenp.prettier-vscode",
|
||||
"redhat.vscode-yaml",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"usernamehw.errorlens",
|
||||
"mhutchie.git-graph",
|
||||
"oderwat.indent-rainbow",
|
||||
"ms-vscode.makefile-tools",
|
||||
"DavidAnson.vscode-markdownlint",
|
||||
"Swellaby.rust-pack",
|
||||
"eamodio.gitlens",
|
||||
"Zerotaskx.rust-extension-pack"
|
||||
],
|
||||
|
||||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "lapce"
|
||||
}
|
Loading…
Reference in New Issue