Dev Container refinements (#9)

This commit is contained in:
Olivier Benz 2023-08-21 10:27:03 +02:00 committed by GitHub
parent 01d1c623e5
commit 89c9667883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 17 deletions

View File

@ -5,8 +5,6 @@ FROM ${BUILD_ON_IMAGE}:${JULIA_VERSION} as files
ARG DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN mkdir /files
COPY julia-base/conf/user /files
@ -31,10 +29,8 @@ ENV LANG=${SET_LANG:-$LANG} \
TZ=${SET_TZ:-$TZ} \
PARENT_IMAGE_BUILD_DATE=${BUILD_DATE}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
## Change root's shell to ZSH
RUN if [ ! -z "$USE_ZSH_FOR_ROOT" ]; then \
RUN if [ -n "$USE_ZSH_FOR_ROOT" ]; then \
chsh -s /bin/zsh; \
fi \
## Update timezone if needed
@ -52,7 +48,7 @@ RUN if [ ! -z "$USE_ZSH_FOR_ROOT" ]; then \
fi \
## Allow updating pre-installed Julia packages
## Make sure $JULIA_PATH/local/share/julia/registries/* is deleted
&& rm -rf ${JULIA_PATH}/local/share/julia/registries/*
&& rm -rf "${JULIA_PATH}/local/share/julia/registries"/*
## Pip: Install to the Python user install directory (1) or not (0)
ARG PIP_USER=1

View File

@ -34,7 +34,9 @@
"customizations": {
"vscode": {
"extensions": [
"eamodio.gitlens@11.7.0",
"editorconfig.editorconfig",
"mhutchie.git-graph",
"ms-python.python",
"mutantdino.resourcemonitor",
"julialang.language-julia",
@ -44,6 +46,8 @@
"ms-azuretools.vscode-docker"
],
"settings": {
"gitlens.showWelcomeOnInstall": false,
"gitlens.showWhatsNewAfterUpgrades": false,
"julia.enableCrashReporter": false,
"julia.enableTelemetry": false,
"resmon.show.battery": false,
@ -52,10 +56,10 @@
}
},
// Set 'remoteUser' to 'root' to connect as root instead.
"remoteUser": "vscode",
// "remoteUser": "root",
"mounts": [
"source=jfda-home-vscode,target=/home/vscode,type=volume"
],
// By default,
// - Julia starts up with a single thread of execution.

View File

@ -4,14 +4,14 @@
set -e
mkdir -p "${HOME}/.julia/config"
mkdir -p "$HOME/.julia/config"
# Copy user-specific startup files if home directory is bind mounted
if [ ! -f "${HOME}/.julia/config/startup_ijulia.jl" ]; then
if [ ! -f "$HOME/.julia/config/startup_ijulia.jl" ]; then
cp -a /etc/skel/.julia/config/startup_ijulia.jl \
"${HOME}/.julia/config"
"$HOME/.julia/config"
fi
if [ ! -f "${HOME}/.julia/config/startup.jl" ]; then
if [ ! -f "$HOME/.julia/config/startup.jl" ]; then
cp -a /etc/skel/.julia/config/startup.jl \
"${HOME}/.julia/config"
"$HOME/.julia/config"
fi

View File

@ -34,7 +34,9 @@
"customizations": {
"vscode": {
"extensions": [
"eamodio.gitlens@11.7.0",
"editorconfig.editorconfig",
"mhutchie.git-graph",
"ms-python.python",
"mutantdino.resourcemonitor",
"julialang.language-julia",
@ -46,6 +48,8 @@
"ms-azuretools.vscode-docker"
],
"settings": {
"gitlens.showWelcomeOnInstall": false,
"gitlens.showWhatsNewAfterUpgrades": false,
"julia.enableCrashReporter": false,
"julia.enableTelemetry": false,
"resmon.show.battery": false,
@ -54,10 +58,10 @@
}
},
// Set 'remoteUser' to 'root' to connect as root instead.
"remoteUser": "vscode",
// "remoteUser": "root",
"mounts": [
"source=jfda-home-vscode,target=/home/vscode,type=volume"
],
// By default,
// - Julia starts up with a single thread of execution.