Update codespaces-linux to Oryx 20210514.2 (#865)

This commit is contained in:
Chuck Lantz 2021-05-20 12:20:46 -07:00 коммит произвёл GitHub
Родитель 6bce4ece75
Коммит 5607d1774b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 72 добавлений и 73 удалений

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

@ -9295,4 +9295,36 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
Jekyll - MIT
https://github.com/jekyll/jekyll
The MIT License (MIT)
Copyright (c) 2008-present Tom Preston-Werner and Jekyll contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---------------------------------------------------------

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

@ -250,6 +250,10 @@
"conda": {
"versionCommand": "conda --version | grep -oE '[0-9]+\\.[0-9]+\\.[0-9]+'",
"downloadUrl": "https://github.com/conda/conda"
},
"Jekyll": {
"versionCommand": "jekyll --version | grep -oE '[0-9]+\\.[0-9]+\\.[0-9]+'",
"downloadUrl": "https://jekyllrb.com/"
}
}
}

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

@ -2,7 +2,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM mcr.microsoft.com/oryx/build:vso-focal-20210319.1 as kitchensink
FROM mcr.microsoft.com/oryx/build:vso-focal-20210514.2 as kitchensink
ARG USERNAME=codespace
ARG USER_UID=1000
@ -36,7 +36,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& bash /tmp/scripts/common-debian.sh "true" "${USERNAME}" "${USER_UID}" "${USER_GID}" "true" "true" "true" \
&& bash /tmp/scripts/setup-user.sh "${USERNAME}" "${PATH}" \
# Change owner of opt contents since Oryx can dynamically install and will run as "codespace"
&& chown codespace /opt/* \
&& chown ${USERNAME} /opt/* \
# Verify expected build and debug tools are present
&& apt-get -y install build-essential cmake cppcheck valgrind clang lldb llvm gdb python3-dev \
# Install tools and shells not in common script
@ -61,25 +61,16 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# Install Python, PHP, Ruby utilities
RUN bash /tmp/scripts/python-debian.sh "none" "/opt/python/latest" "${PIPX_HOME}" "${USERNAME}" "true" \
# Install rvm, rbenv, base gems
&& chown -R ${USERNAME} /opt/ruby/*/lib /opt/ruby/*/bin \
# Install rvm, rbenv, any missing base gems
&& chown -R ${USERNAME} /opt/ruby/* \
&& bash /tmp/scripts/ruby-debian.sh "none" "${USERNAME}" "true" "true" \
# Install xdebug, link composer
&& yes | pecl install xdebug \
&& export PHP_LOCATION=$(dirname $(dirname $(which php))) \
&& echo "zend_extension=$(find ${PHP_LOCATION}/lib/php/extensions/ -name xdebug.so)" > ${PHP_LOCATION}/ini/conf.d/xdebug.ini \
&& echo "xdebug.mode = debug" >> ${PHP_LOCATION}/ini/conf.d/xdebug.ini \
&& echo "xdebug.start_with_request = yes" >> ${PHP_LOCATION}/ini/conf.d/xdebug.ini \
&& echo "xdebug.client_port = 9000" >> ${PHP_LOCATION}/ini/conf.d/xdebug.ini \
&& rm -rf /tmp/pear \
# Link composer
&& ln -s $(which composer.phar) /usr/local/bin/composer \
&& apt-get clean -y
# Install PowerShell and setup .NET Core
COPY symlinkDotNetCore.sh /home/${USERNAME}/symlinkDotNetCore.sh
RUN su ${USERNAME} -c 'bash /home/${USERNAME}/symlinkDotNetCore.sh' 2>&1 \
&& bash /tmp/scripts/powershell-debian.sh \
&& apt-get clean -y && rm -rf /home/${USERNAME}/symlinkDotNetCore.sh
# Install PowerShell
RUN bash /tmp/scripts/powershell-debian.sh \
&& apt-get clean -y
# Setup Node.js, install NVM and NVS
RUN bash /tmp/scripts/node-debian.sh "${NVM_DIR}" "none" "${USERNAME}" \
@ -97,11 +88,9 @@ RUN bash /tmp/scripts/node-debian.sh "${NVM_DIR}" "none" "${USERNAME}" \
# Install SDKMAN, OpenJDK8 (JDK 11 already present), gradle (maven already present)
RUN bash /tmp/scripts/gradle-debian.sh "latest" "${SDKMAN_DIR}" "${USERNAME}" "true" \
&& bash /tmp/scripts/java-debian.sh "8.0.275.hs-adpt" "${SDKMAN_DIR}" "${USERNAME}" "true" \
&& su ${USERNAME} -c ". ${SDKMAN_DIR}/bin/sdkman-init.sh \
&& sdk install java opt-java-11 /opt/java/11.0 \
&& sdk install java opt-java-lts /opt/java/lts \
&& sdk default java opt-java-lts"
&& sdk install java 11-opt-java /opt/java/11.0 \
&& sdk install java lts-opt-java /opt/java/lts"
# Install Rust, Go, remove scripts now that we're done with them
RUN bash /tmp/scripts/rust-debian.sh "${CARGO_HOME}" "${RUSTUP_HOME}" "${USERNAME}" "true" \

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

@ -36,12 +36,15 @@
"--privileged",
"--init"
],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"GitHub.vscode-pull-request-github"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// "oryx build" will automatically install your dependencies and attempt to build your project
"postCreateCommand": "oryx build -p virtualenv_name=.venv --log-file /tmp/oryx-build.log || echo 'Could not auto-build. Skipping.'"
"postCreateCommand": "oryx build -p virtualenv_name=.venv --log-file /tmp/oryx-build.log --manifest-dir /tmp || echo 'Could not auto-build. Skipping.'"
}

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

@ -1,45 +0,0 @@
#!/bin/bash
#--------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#--------------------------------------------------------------------------------------------------------------
set -ex
splitSdksDir="/opt/dotnet"
allSdksDir="/home/codespace/.dotnet"
mkdir -p "$allSdksDir"
# Copy latest muxer and license files
cp -f "$splitSdksDir/lts/dotnet" "$allSdksDir"
cp -f "$splitSdksDir/lts/LICENSE.txt" "$allSdksDir"
cp -f "$splitSdksDir/lts/ThirdPartyNotices.txt" "$allSdksDir"
function createLinks() {
local sdkVersion="$1"
installedDir="$splitSdksDir/$sdkVersion"
cd "$installedDir"
# Find folders with the name being a version number like 3.1.0 or 3.1.301
find . -maxdepth 3 -type d -regex '.*/[0-9]\.[0-9]\.[0-9]+' | while read subPath; do
# Trim beginning 2 characters from the line which currently looks like, for example, './sdk/2.2.402'
subPath="${subPath:2}"
linkFrom="$allSdksDir/$subPath"
linkFromParentDir=$(dirname $linkFrom)
mkdir -p "$linkFromParentDir"
linkTo="$installedDir/$subPath"
ln -sTf $linkTo $linkFrom
done
}
# Dynamically find and link all installed dotnet SDKs
find /opt/dotnet/*.*.*/sdk -maxdepth 1 -type d -name "*.*.*" | while read SDK_PATH; do
SDK_VERSION="$(basename ${SDK_PATH})"
createLinks "$SDK_VERSION"
done
set +ex

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

@ -1,5 +1,5 @@
{
"definitionVersion": "1.3.3",
"definitionVersion": "1.4.0",
"build": {
"latest": true,
"rootDistro": "debian",
@ -11,7 +11,7 @@
},
"dependencies": {
"annotation": "This document describes the base contents of the default GitHub Codespaces dev container image. Note that this image also includes detection logic to dynamically install additional language / runtime versions based on your repository's contents. Dynamically installed content can be found in sub-folders under `/opt`.",
"image": "mcr.microsoft.com/oryx/build:vso-focal-20210308.3",
"image": "mcr.microsoft.com/oryx/build:vso-focal-20210514.2",
"imageLink": "https://github.com/microsoft/oryx",
"apt": [{
"cgIgnore": false,
@ -99,7 +99,8 @@
"gem": [
"rake",
"ruby-debug-ide",
"debase"
"debase",
"jekyll"
],
"cargo": {
"rls": null,
@ -194,7 +195,10 @@
"cgIgnore": true
},
"Go": null,
"Rust": null
"Rust": null,
"Jekyll": {
"cgIgnore": true
}
}
}
}

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

@ -1,3 +1,3 @@
node_modules
example.png
jekyll-test

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

@ -14,6 +14,8 @@ check "oryx" oryx --version
# Check .NET
check "dotnet" dotnet --list-sdks
check "oryx-install-dotnet-3.1.0" oryx prep --skip-detection --platforms-and-versions dotnet=3.1.0
check "dotnet-3.1.0-installed" bash -c 'dotnet --info | grep -E "\s3\.1\.0\s"'
# Check Python
check "python" python --version
@ -30,7 +32,7 @@ check "virtualenv" virtualenv --version
# Check Java tools
check "java" java -version
check "sdkman" bash -c ". /usr/local/sdkman/bin/sdkman-init.sh && sdk --version"
check "sdkman" bash -c ". /usr/local/sdkman/bin/sdkman-init.sh && sdk version"
check "gradle" gradle --version
check "maven" mvn --version
@ -40,6 +42,15 @@ check "rvm" bash -c ". /usr/local/rvm/scripts/rvm && rvm --version"
check "rbenv" bash -c 'eval "$(rbenv init -)" && rbenv --version'
check "rake" rake --version
# Check Jekyll dynamic install
mkdir jekyll-test
cd jekyll-test
touch _config.yml
check "oryx-build-jekyll" oryx build --apptype static-sites --manifest-dir /tmp
check "jekyll" jekyll --version
cd ..
rm -rf jekyll-test
# Node.js
check "node" node --version
check "nvm" bash -c ". /home/codespace/.nvm/nvm.sh && nvm --version"
@ -49,6 +60,7 @@ check "npm" npm --version
# PHP
check "php" php --version
check "Xdebug" php --version | grep 'Xdebug'
# Rust
check "cargo" cargo --version