This commit is contained in:
Chuck Lantz 2020-08-30 19:18:44 -07:00
Родитель b30c8b84a6
Коммит fe7699c973
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 1A864C1F8173A215
5 изменённых файлов: 34 добавлений и 15 удалений

Просмотреть файл

@ -1,4 +1,4 @@
ARG VARIANT=14
ARG VARIANT=14-buster
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
# [Optional] Uncomment this section to install additional OS packages.

Просмотреть файл

@ -1,27 +1,26 @@
# Update the VARIANT arg in devcontainer.json to pick a Node.js version: 14, 12, 10
ARG VARIANT=14
ARG VARIANT=14-buster
FROM node:${VARIANT}
# Options for setup scripts
# Install needed packages, yarn, nvm and setup non-root user. Use a separate RUN statement to add your own dependencies.
ARG INSTALL_ZSH="true"
ARG UPGRADE_PACKAGES="true"
ARG USERNAME=node
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ENV NVM_DIR=/usr/local/share/nvm
ENV NVM_SYMLINK_CURRENT=true \
PATH=${NVM_DIR}/current/bin:${PATH}
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
COPY library-scripts/*.sh /tmp/library-scripts/
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131
&& apt-get purge -y imagemagick imagemagick-6-common \
# Install common packages, non-root user, update yarn and install nvm
&& /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
&& bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
# Install yarn, nvm
&& rm -rf /opt/yarn-* /usr/local/bin/yarn /usr/local/bin/yarnpkg \
&& /bin/bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "none" "${USERNAME}" \
&& bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "none" "${USERNAME}" \
# Clean up
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /root/.gnupg /tmp/library-scripts
# Configure global npm install location
@ -31,11 +30,12 @@ RUN mkdir -p ${NPM_GLOBAL} \
&& chown ${USERNAME}:root ${NPM_GLOBAL} \
&& npm config -g set prefix ${NPM_GLOBAL} \
&& sudo -u ${USERNAME} npm config -g set prefix ${NPM_GLOBAL} \
&& echo "if [ \"\$(stat -c '%U' ${NPM_GLOBAL})\" != \"${USERNAME}\" ]; then sudo chown -R ${USER_UID}:root ${NPM_GLOBAL} ${NVM_DIR}; fi" \
&& echo "if [ \"\$(stat -c '%U' ${NPM_GLOBAL})\" != \"${USERNAME}\" ]; then sudo chown -R ${USERNAME}:root ${NPM_GLOBAL} ${NVM_DIR}; fi" \
| tee -a /etc/bash.bashrc >> /etc/zsh/zshrc
# Install eslint globally
RUN sudo -u ${USERNAME} npm install -g eslint
# Install eslint
RUN sudo -u ${USERNAME} npm install -g eslint \
&& npm cache clean --force > /dev/null 2>&1
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

Просмотреть файл

@ -1,10 +1,19 @@
{
"variants": ["14", "12", "10"],
"variants": ["14-buster", "12-buster", "10-buster","14-stretch", "12-stretch", "10-stretch"],
"build": {
"latest": true,
"rootDistro": "debian",
"tags": [
"javascript-node:${VERSION}-${VARIANT}"
],
"14-buster": [
"14"
],
"12-buster": [
"12"
],
"10-buster": [
"10"
]
},
"dependencies": {

Просмотреть файл

@ -1,9 +1,10 @@
ARG VARIANT=14
ARG VARIANT=14-buster
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
# Install tslint, typescript. eslint is installed by javascript image
ARG USERNAME=node
RUN sudo -u ${USERNAME} npm install -g tslint typescript
RUN sudo -u ${USERNAME} npm install -g tslint typescript \
&& npm cache clean --force > /dev/null 2>&1
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

Просмотреть файл

@ -1,11 +1,20 @@
{
"variants": ["14", "12", "10"],
"variants": ["14-buster", "12-buster", "10-buster", "14-stretch", "12-stretch", "10-stretch"],
"build": {
"latest": true,
"rootDistro": "debian",
"parent": "javascript-node",
"tags": [
"typescript-node:${VERSION}-${VARIANT}"
],
"14-buster": [
"14"
],
"12-buster": [
"12"
],
"10-buster": [
"10"
]
},
"dependencies": {