diff --git a/4.4/Dockerfile b/4.4/Dockerfile index 620a4ed..082371c 100644 --- a/4.4/Dockerfile +++ b/4.4/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-4.4:20190301.2 - +FROM oryxprod/node-4.4:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/4.4/sshd_config b/4.4/sshd_config index 7787ce7..04b53f9 100644 --- a/4.4/sshd_config +++ b/4.4/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/4.4/startup/init_container.sh b/4.4/startup/init_container.sh index 7fed6ec..efbfa60 100644 --- a/4.4/startup/init_container.sh +++ b/4.4/startup/init_container.sh @@ -22,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/4.5/Dockerfile b/4.5/Dockerfile index c4daccf..9d407e0 100644 --- a/4.5/Dockerfile +++ b/4.5/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-4.5:20190301.2 - +FROM oryxprod/node-4.5:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/4.5/sshd_config b/4.5/sshd_config index 7787ce7..04b53f9 100644 --- a/4.5/sshd_config +++ b/4.5/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/4.5/startup/init_container.sh b/4.5/startup/init_container.sh index 7fed6ec..efbfa60 100644 --- a/4.5/startup/init_container.sh +++ b/4.5/startup/init_container.sh @@ -22,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/4.8/Dockerfile b/4.8/Dockerfile index 67e446e..4edae88 100644 --- a/4.8/Dockerfile +++ b/4.8/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-4.8:20190301.2 - +FROM oryxprod/node-4.8:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/4.8/sshd_config b/4.8/sshd_config index 7787ce7..04b53f9 100644 --- a/4.8/sshd_config +++ b/4.8/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/4.8/startup/init_container.sh b/4.8/startup/init_container.sh index 7fed6ec..efbfa60 100644 --- a/4.8/startup/init_container.sh +++ b/4.8/startup/init_container.sh @@ -22,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/6.10/Dockerfile b/6.10/Dockerfile index f9f883c..e0b572c 100644 --- a/6.10/Dockerfile +++ b/6.10/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-6.10:20190301.2 - +FROM oryxprod/node-6.10:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/6.10/sshd_config b/6.10/sshd_config index 7787ce7..04b53f9 100644 --- a/6.10/sshd_config +++ b/6.10/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/6.10/startup/init_container.sh b/6.10/startup/init_container.sh index 7fed6ec..efbfa60 100644 --- a/6.10/startup/init_container.sh +++ b/6.10/startup/init_container.sh @@ -22,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/6.11/Dockerfile b/6.11/Dockerfile index eb67dd3..5ae7377 100644 --- a/6.11/Dockerfile +++ b/6.11/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-6.11:20190301.2 - +FROM oryxprod/node-6.11:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/6.11/sshd_config b/6.11/sshd_config index 7787ce7..04b53f9 100644 --- a/6.11/sshd_config +++ b/6.11/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/6.11/startup/init_container.sh b/6.11/startup/init_container.sh index 7fed6ec..efbfa60 100644 --- a/6.11/startup/init_container.sh +++ b/6.11/startup/init_container.sh @@ -22,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/6.2/Dockerfile b/6.2/Dockerfile index 5afbd27..0a9e3ae 100644 --- a/6.2/Dockerfile +++ b/6.2/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-6.2:20190301.2 - +FROM oryxprod/node-6.2:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/6.2/sshd_config b/6.2/sshd_config index 7787ce7..04b53f9 100644 --- a/6.2/sshd_config +++ b/6.2/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/6.2/startup/init_container.sh b/6.2/startup/init_container.sh index 7fed6ec..efbfa60 100644 --- a/6.2/startup/init_container.sh +++ b/6.2/startup/init_container.sh @@ -22,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/6.6/Dockerfile b/6.6/Dockerfile index bf9e2fd..a9a8d35 100644 --- a/6.6/Dockerfile +++ b/6.6/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-6.6:20190301.2 - +FROM oryxprod/node-6.6:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/6.6/sshd_config b/6.6/sshd_config index 7787ce7..04b53f9 100644 --- a/6.6/sshd_config +++ b/6.6/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/6.6/startup/init_container.sh b/6.6/startup/init_container.sh index 7fed6ec..efbfa60 100644 --- a/6.6/startup/init_container.sh +++ b/6.6/startup/init_container.sh @@ -22,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/6.9/Dockerfile b/6.9/Dockerfile index 3b29705..2c958f5 100644 --- a/6.9/Dockerfile +++ b/6.9/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-6.9:20190301.2 - +FROM oryxprod/node-6.9:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/6.9/sshd_config b/6.9/sshd_config index 7787ce7..04b53f9 100644 --- a/6.9/sshd_config +++ b/6.9/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/6.9/startup/init_container.sh b/6.9/startup/init_container.sh index 7fed6ec..efbfa60 100644 --- a/6.9/startup/init_container.sh +++ b/6.9/startup/init_container.sh @@ -22,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/8.0/Dockerfile b/8.0/Dockerfile index 803340a..c60151a 100644 --- a/8.0/Dockerfile +++ b/8.0/Dockerfile @@ -1,10 +1,16 @@ -FROM oryxprod/node-8.0:20181222.1 +FROM oryxprod/node-8.0:20190401.5 +LABEL maintainer="Azure App Services Container Images " -MAINTAINER Azure App Services Container Images +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html -COPY sshd_config /etc/ssh/ RUN mkdir -p /home/LogFiles \ && echo "root:Docker!" | chpasswd \ @@ -12,6 +18,9 @@ RUN mkdir -p /home/LogFiles \ && apt update \ && apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute +RUN rm -f /etc/ssh/sshd_config +COPY sshd_config /etc/ssh/ + # Workaround for https://github.com/npm/npm/issues/16892 # Running npm install as root blows up in a --userns-remap # environment. @@ -32,11 +41,12 @@ USER root # End workaround +ENV PORT 8080 +ENV SSH_PORT 2222 EXPOSE 2222 8080 ENV PM2HOME /pm2home -ENV PORT 8080 ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot diff --git a/8.0/hostingstart.html b/8.0/hostingstart.html index 580cc12..fc225bd 100644 --- a/8.0/hostingstart.html +++ b/8.0/hostingstart.html @@ -1,38 +1 @@ - - - - - - - -Microsoft Azure App Service - Welcome - - - - - - -
-
-hostingstart-v2-02 -
-
-

Your App Service app has been created

-

Go to your app's - -Quick Start guide in the Azure portal to get started or read our - -deployment documentation. -

-
-
- - - - \ No newline at end of file +Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

\ No newline at end of file diff --git a/8.0/sshd_config b/8.0/sshd_config index a3690f2..04b53f9 100644 --- a/8.0/sshd_config +++ b/8.0/sshd_config @@ -2,14 +2,15 @@ # # /etc/sshd_config -Port 2222 +Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/8.0/startup/init_container.sh b/8.0/startup/init_container.sh index 0830160..efbfa60 100644 --- a/8.0/startup/init_container.sh +++ b/8.0/startup/init_container.sh @@ -14,6 +14,7 @@ NodeJS quickstart: https://aka.ms/node-qs EOL cat /etc/motd +sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config service ssh start mkdir "$PM2HOME" @@ -21,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/8.1/Dockerfile b/8.1/Dockerfile index f90182b..b340610 100644 --- a/8.1/Dockerfile +++ b/8.1/Dockerfile @@ -1,10 +1,16 @@ -FROM oryxprod/node-8.1:20181222.1 +FROM oryxprod/node-8.1:20190401.5 +LABEL maintainer="Azure App Services Container Images " -MAINTAINER Azure App Services Container Images +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html -COPY sshd_config /etc/ssh/ RUN mkdir -p /home/LogFiles \ && echo "root:Docker!" | chpasswd \ @@ -12,6 +18,9 @@ RUN mkdir -p /home/LogFiles \ && apt update \ && apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute +RUN rm -f /etc/ssh/sshd_config +COPY sshd_config /etc/ssh/ + # Workaround for https://github.com/npm/npm/issues/16892 # Running npm install as root blows up in a --userns-remap # environment. @@ -32,11 +41,12 @@ USER root # End workaround +ENV PORT 8080 +ENV SSH_PORT 2222 EXPOSE 2222 8080 ENV PM2HOME /pm2home -ENV PORT 8080 ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot diff --git a/8.1/hostingstart.html b/8.1/hostingstart.html index 580cc12..fc225bd 100644 --- a/8.1/hostingstart.html +++ b/8.1/hostingstart.html @@ -1,38 +1 @@ - - - - - - - -Microsoft Azure App Service - Welcome - - - - - - -
-
-hostingstart-v2-02 -
-
-

Your App Service app has been created

-

Go to your app's - -Quick Start guide in the Azure portal to get started or read our - -deployment documentation. -

-
-
- - - - \ No newline at end of file +Microsoft Azure App Service - Welcome

Hey, Node developers!


Your app service is up and running.

Time to take the next step and deploy your code.

Have your code ready?
Use deployment center to get code published from your client or setup continuous deployment.

Don't have your code yet?
Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.

\ No newline at end of file diff --git a/8.1/sshd_config b/8.1/sshd_config index a3690f2..04b53f9 100644 --- a/8.1/sshd_config +++ b/8.1/sshd_config @@ -2,14 +2,15 @@ # # /etc/sshd_config -Port 2222 +Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/8.1/startup/init_container.sh b/8.1/startup/init_container.sh index 0830160..efbfa60 100644 --- a/8.1/startup/init_container.sh +++ b/8.1/startup/init_container.sh @@ -14,6 +14,7 @@ NodeJS quickstart: https://aka.ms/node-qs EOL cat /etc/motd +sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config service ssh start mkdir "$PM2HOME" @@ -21,7 +22,30 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) + +# +# Extract dependencies if required: +# +if [ -f "oryx-manifest.toml" ] && [ ! "$APPSVC_RUN_ZIP" = "TRUE" ] ; then + echo "Found 'oryx-manifest.toml', checking if node_modules was compressed..." + source "oryx-manifest.toml" + if [ ${compressedNodeModulesFile: -4} == ".zip" ]; then + echo "Found zip-based node_modules." + extractionCommand="unzip -q $compressedNodeModulesFile -d /node_modules" + elif [ ${compressedNodeModulesFile: -7} == ".tar.gz" ]; then + echo "Found tar.gz based node_modules." + extractionCommand="tar -xzf $compressedNodeModulesFile -C /node_modules" + fi + if [ ! -z "$extractionCommand" ]; then + echo "Removing existing modules directory..." + rm -fr /node_modules + mkdir -p /node_modules + echo "Extracting modules..." + $extractionCommand + fi + echo "Done." +fi echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js diff --git a/8.2/Dockerfile b/8.2/Dockerfile index cd55e79..1cfae6d 100644 --- a/8.2/Dockerfile +++ b/8.2/Dockerfile @@ -1,7 +1,14 @@ -FROM oryxprod/node-8.2:20190301.2 - +FROM oryxprod/node-8.2:20190401.5 LABEL maintainer="Azure App Services Container Images " +RUN echo "deb http://deb.debian.org/debian/ jessie main" > /etc/apt/sources.list \ + && echo "deb-src http://deb.debian.org/debian/ jessie main" >> /etc/apt/sources.list \ + && echo "deb http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb-src http://security.debian.org/ jessie/updates main" >> /etc/apt/sources.list \ + && echo "deb http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "deb-src http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ + && echo "Acquire::Check-Valid-Until \"false\";" > /etc/apt/apt.conf + COPY startup /opt/startup COPY hostingstart.html /home/site/wwwroot/hostingstart.html diff --git a/8.2/sshd_config b/8.2/sshd_config index 7787ce7..04b53f9 100644 --- a/8.2/sshd_config +++ b/8.2/sshd_config @@ -6,10 +6,11 @@ Port SSH_PORT ListenAddress 0.0.0.0 LoginGraceTime 180 X11Forwarding yes -Ciphers aes128-cbc,3des-cbc,aes256-cbc +Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr MACs hmac-sha1,hmac-sha1-96 StrictModes yes SyslogFacility DAEMON PasswordAuthentication yes PermitEmptyPasswords no PermitRootLogin yes +Subsystem sftp internal-sftp diff --git a/8.2/startup/init_container.sh b/8.2/startup/init_container.sh index 7fed6ec..66682b4 100644 --- a/8.2/startup/init_container.sh +++ b/8.2/startup/init_container.sh @@ -22,7 +22,7 @@ chmod 777 "$PM2HOME" ln -s /home/LogFiles "$PM2HOME"/logs # Get environment variables to show up in SSH session -eval $(printenv | awk -F= '{print "export " $1"="$2 }' >> /etc/profile) +eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) echo "$@" > /opt/startup/startupCommand node /opt/startup/generateStartupCommand.js