Use Volta to manage Node and Yarn version

This commit is contained in:
Felipe Santos
2023-02-11 12:15:53 -03:00
parent 163679c650
commit 7e511177ad
9 changed files with 104 additions and 73 deletions
+8 -9
View File
@@ -1,10 +1,9 @@
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-16
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
# Install Docker
ENV DOCKER_BUILDKIT="1"
# https://github.com/microsoft/vscode-dev-containers/commits/main/script-library/docker-debian.sh
ARG DOCKER_SCRIPT_VERSION="364972b0d7d20ee5de40c1084e65f3f1bc6d5951"
RUN bash -c "$(curl -fsSL "https://raw.githubusercontent.com/microsoft/vscode-dev-containers/${DOCKER_SCRIPT_VERSION}/script-library/docker-debian.sh")" \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/usr/local/share/docker-init.sh"]
CMD ["sleep", "infinity"]
USER vscode
# Install Volta
ARG HOME="/home/vscode"
ENV VOLTA_HOME="${HOME}/.volta"
ENV PATH="${VOLTA_HOME}/bin:${PATH}"
RUN bash -c "$(curl -fsSL https://get.volta.sh)" -- --skip-setup