42 lines
1.5 KiB
Docker
42 lines
1.5 KiB
Docker
# Update the VARIANT arg in docker-compose.yml to pick an Elixir version: 1.9, 1.10, 1.10.4
|
|
ARG VARIANT="1.17.2"
|
|
FROM elixir:${VARIANT}
|
|
|
|
# This Dockerfile adds a non-root user with sudo access. Update the “remoteUser” property in
|
|
# devcontainer.json to use it. More info: https://aka.ms/vscode-remote/containers/non-root-user.
|
|
ARG USERNAME=vscode
|
|
ARG USER_UID=1000
|
|
ARG USER_GID=$USER_UID
|
|
|
|
# Options for common package install script
|
|
ARG INSTALL_ZSH="true"
|
|
ARG UPGRADE_PACKAGES="true"
|
|
|
|
# Optional Settings for Phoenix
|
|
ARG PHOENIX_VERSION="1.7.12"
|
|
|
|
# [Optional] Setup nodejs
|
|
ARG NODE_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/main/script-library/node-debian.sh"
|
|
ARG NODE_SCRIPT_SHA="dev-mode"
|
|
ARG NODE_VERSION="none"
|
|
ENV NVM_DIR=/usr/local/share/nvm
|
|
ENV NVM_SYMLINK_CURRENT=true
|
|
ENV PATH=${NVM_DIR}/current/bin:${PATH}
|
|
|
|
# [Optional, Choice] Node.js version: none, lts/*, 16, 14, 12, 10
|
|
ARG NODE_VERSION="21.7.3"
|
|
|
|
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
|
|
|
|
RUN su ${USERNAME} -c "mix local.hex --force \
|
|
&& mix local.rebar --force \
|
|
&& mix archive.install --force hex phx_new ${PHOENIX_VERSION}"
|
|
|
|
# [Optional] Uncomment this section to install additional OS packages.
|
|
RUN apt-get update \
|
|
&& export DEBIAN_FRONTEND=noninteractive \
|
|
&& apt-get -y install --no-install-recommends postgresql-client inotify-tools
|
|
|
|
# [Optional] Uncomment this line to install additional package.
|
|
# RUN mix ...
|