Skip to content

Instantly share code, notes, and snippets.

@gf3
Created June 24, 2024 13:50
Show Gist options
  • Save gf3/dd1431050bb1a0fcba3ea455b3a6502f to your computer and use it in GitHub Desktop.
Save gf3/dd1431050bb1a0fcba3ea455b3a6502f to your computer and use it in GitHub Desktop.
Elixir Devcontainer
// For format details, see https://aka.ms/devcontainer.json
{
"name": "Default Linux Universal",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"upgradePackages": true,
"nonFreePackages": true,
"username": "codespace",
"userUid": "automatic",
"userGid": "automatic"
},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": "false"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "latest"
}
},
"overrideFeatureInstallOrder": [
"ghcr.io/devcontainers/features/common-utils",
"ghcr.io/devcontainers/features/git",
"ghcr.io/devcontainers/features/sshd",
"ghcr.io/devcontainers/features/github-cli",
"ghcr.io/stuartleeks/dev-container-features/shell-history:0"
],
"remoteUser": "codespace",
"containerUser": "codespace",
"updateRemoteUserUID": true,
"workspaceMount": "",
"runArgs": [
"--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z"
],
"customizations": {
"settings": {
"remote.containers.copyGitConfig": true
},
"vscode": {
"extensions": [
"eamodio.gitlens",
"eduarbo.relative-file-navigator",
"GitHub.copilot-chat",
"GitHub.copilot",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"JakeBecker.elixir-ls",
"ms-azuretools.vscode-docker",
"ow.vscode-subword-navigation",
"samuel-pordeus.elixir-test"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "fish",
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/bin/fish"
}
}
}
}
}
}
FROM elixir:1.17-otp-27
LABEL org.opencontainers.image.description="Elixir devcontainer for VSCode or Codespaces"
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG="C.UTF-8"
# Install basic build tools
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
gettext \
inotify-tools \
make \
unzip
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
# Mount for docker-in-docker
VOLUME [ "/var/lib/docker" ]
# Fire Docker/Moby script if needed
ENTRYPOINT [ "/usr/local/share/docker-init.sh", "/usr/local/share/ssh-init.sh"]
CMD [ "sleep", "infinity" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment