php , node , ruby built images

This commit is contained in:
sunitha muthukrishna 2018-01-26 11:27:48 -08:00
Родитель c18d7b1a5f
Коммит 00fc2fca09
268 изменённых файлов: 11107 добавлений и 298 удалений

13
.github/CHANGELOG.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,13 @@
## [project-title] Changelog
<a name="x.y.z"></a>
# x.y.z (yyyy-mm-dd)
*Features*
* ...
*Bug Fixes*
* ...
*Breaking Changes*
* ...

25
.github/ISSUE_TEMPLATE.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,25 @@
<!--
IF SUFFICIENT INFORMATION IS NOT PROVIDED VIA THE FOLLOWING TEMPLATE THE ISSUE MIGHT BE CLOSED WITHOUT FURTHER CONSIDERATION OR INVESTIGATION
-->
> Please provide us with the following information:
> ---------------------------------------------------------------
### This issue is for a: (mark with an `x`)
```
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```
### Minimal steps to reproduce
>
### Any log messages given by the failure
>
### Expected/desired behavior
>
> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

34
.github/PULL_REQUEST_TEMPLATE.md поставляемый Normal file
Просмотреть файл

@ -0,0 +1,34 @@
## Purpose
<!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? -->
* ...
## Pull Request Type
What kind of change does this Pull Request introduce? Please check the one that applies to this PR using "x".
```
[ ] Bugfix
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:
```
## What to Check
Review and check the following guidelines before submitting a PR.
1. Include a README.md within version folder to describe :
a. Any changes with deployment of use of the image
b. Include comments if the image is not backward compatible and how user can manually upgrade to new version
2. SSH support included in the docker image.
3. Do no use VOLUME with the docker image since it is not supported
4. Use only ONE external port in addition to SSH port 2222
5. Do not use chown (recursive) statements with the docker image
```
Please check both statements below to agree our contribution policies.
[] - I have submitted the PR if you've read through the Contribution Guide and best practices checklist.
[] - I certify that the Docker image was tested successfully at runtime using Web App for Containers or Linux Web App.
```
### Changelog
- Add your list of changes here

288
.gitignore поставляемый
Просмотреть файл

@ -1,288 +0,0 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Typescript v1 declaration files
typings/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs

19
.travis.yml Normal file
Просмотреть файл

@ -0,0 +1,19 @@
sudo: true
dist: trusty
before_install:
- chmod +x ./travis-script/main.sh
- chmod +x ./travis-script/test-dockerfile.sh
- chmod +x ./travis-script/test-build-push.sh
jobs:
include:
- stage: check Dockerfile
script: ./travis-script/main.sh
notifications:
email:
recipients:
- v-jizh11@microsoft.com
- leonzh@wicresoft.com
on_success: always
on_failure: always

76
CONTRIBUTING.md Normal file
Просмотреть файл

@ -0,0 +1,76 @@
# Contributing to App Service Built in images
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
- [Code of Conduct](#coc)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
## <a name="coc"></a> Code of Conduct
Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
## <a name="issue"></a> Found an Issue?
If you find a bug in the source code or a mistake in the documentation, you can help us by
[submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can
[submit a Pull Request](#submit-pr) with a fix.
## <a name="feature"></a> Want a Feature?
You can *request* a new feature by [submitting an issue](#submit-issue) to the GitHub
Repository. If you would like to *implement* a new feature, please submit an issue with
a proposal for your work first, to be sure that we can use it.
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
## <a name="submit"></a> Submission Guidelines
### <a name="submit-issue"></a> Submitting an Issue
Before you submit an issue, search the archive, maybe your question was already answered.
If your issue appears to be a bug, and hasn't been reported, open a new issue.
Help us to maximize the effort we can spend fixing issues and adding new
features, by not reporting duplicate issues. Providing the following information will increase the
chances of your issue being dealt with quickly:
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
* **Version** - what version is affected (e.g. 0.1.2)
* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
* **Browsers and Operating System** - is this a problem with all browsers?
* **Reproduce the Error** - provide a live example or a unambiguous set of steps
* **Related Issues** - has a similar issue been reported before?
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
causing the problem (line of code or commit)
You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/[organization-name]/[repository-name]/issues/new].
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
Before you submit your Pull Request (PR) consider the following guidelines:
* Search the repository (https://github.com/[organization-name]/[repository-name]/pulls) for an open or closed PR
that relates to your submission. You don't want to duplicate effort.
* Make your changes in a new git fork:
* Commit your changes using a descriptive commit message
* Push your fork to GitHub:
* In GitHub, create a pull request
* If we suggest changes then:
* Make the required updates.
* Rebase your fork and force push to your GitHub repository (this will update your Pull Request):
```shell
git rebase master -i
git push -f
```
That's it! Thank you for your contribution!

2
PR_SHAs.txt Normal file
Просмотреть файл

@ -0,0 +1,2 @@
sha 1d2db34ebe0da5efb617b5959194a635fa0efa44
sha ae7b047ae68264d2336528db8eb12aaf95a5c2ea

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

@ -1,14 +1,44 @@
# App Service Linux - Built in runtime Docker images
# Contributing
This repo contains all docker images for App Service on Linux Built in runtime for PHP , Ruby , Node JS and .NET core.
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.
## Contribution guide
Please follow the guidelines to be compliant . If any docker image is out of compliance , it will be **blacklisted** from this repo and eventually removed.
## Files, folders and naming conventions
1. Create a new folder for a new docker image and include a version folder . Such as
```
+my-image
\ version-number
\Dockerfile and other files
```
*Note: If you are updating an existing image , create a new version folder within your image folder.*
2.Include a README.md within version folder to describe :
a. Any changes with deployment of use of the image
b. Include comments if the image is not backward compatible and how user can manually upgrade to new version
+ [**Best practices**](/contribution-guide/best-practices.md). Best practices for improving the quality of your docker image
+ [**Git tutorial**](/contribution-guide/git-tutorial.md). Step by step to get you started with Git.
+ [**Useful Tools**](/contribution-guide/useful-tools.md). Useful resources and tools for docker image development
## Submission workflow
The submission process 6 step process as shown below. The time taken to approve or reject a PR can vary as this is community driven.
![Submission workflow for docker images](images/submission-flow.PNG?raw=true)
## Deploying Samples
You can deploy these directly from the Azure portal.
1. Login to [Azure portal](https://portal.azure.com)
2. Search for "Web App"
3. Select Linux OS
*Note: The first request can take longer to complete since the docker image needs to be pulled and run on the container for the first request. This can occur when you scale up your application or the instance gets recycled.*
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

7
commit_files.txt Normal file
Просмотреть файл

@ -0,0 +1,7 @@
drupal-nginx-fpm/0.2/Dockerfile
drupal-nginx-fpm/0.2/LICENSE
drupal-nginx-fpm/0.2/README.md
drupal-nginx-fpm/0.2/drupal.tar.gz
drupal-nginx-fpm/0.2/entrypoint.sh
drupal-nginx-fpm/0.2/nginx.conf
drupal-nginx-fpm/0.2/php.ini

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

@ -0,0 +1,13 @@
## Best practices
These docker images listed are to be used with Web App for Containers , check out things you should know about [Web App for Containers](https://blogs.msdn.microsoft.com/waws/2017/09/08/things-you-should-know-web-apps-and-linux/)Follow the best practices as listed below :
1. Follow the best practices for writing a docker image as listed [here](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/). Note that , Web app for containers has a few limitations that are not supported :
- Do not use VOLUME , USER instructions
- Do not use ```chown``` statements
- You can use only ONE port in additional to using the port for SSH i.e 2222
2. Include [SSH support](https://docs.microsoft.com/en-us/azure/app-service/containers/app-service-linux-ssh-support) in your docker image to allow users using the image to debug issues.
3. Learn how to use the custom image on [Web App for Containers](https://docs.microsoft.com/en-us/azure/app-service/containers/quickstart-custom-docker-image). Since the platform is different than local Docker engine hosted machine , it is a good practice to test your build your image in Azure using web app for containers.

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

@ -0,0 +1,13 @@
## Git tutorial
We're following basic GitHub Flow. If you have ever contributed to an open source project on GitHub, you probably know it already - if you have no idea what we're talking about, check out [GitHub's official guide](https://guides.github.com/introduction/flow/). Here's a quick summary:
+ Fork the repository and clone to your local machine
+ You should already be on the default branch `master` - if not, check it out (`git checkout master`)
+ Create a new branch for your template (`git checkout -b my-new-image-version)
+ Write your template
+ Stage the changed files for a commit (`git add .`)
+ Commit your files with a useful commit message (`git commit`)
+ Push your new branch to your GitHub Fork (`git push origin my-new-image-version`)
+ Visit this repository in GitHub and create a Pull Request.

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

@ -0,0 +1,7 @@
[Working with Docker on VS code](https://code.visualstudio.com/docs/languages/dockerfile)
[Get started with Docker][https://docs.docker.com/get-started/)
[Microsoft Tools for Docker](https://github.com/Microsoft/DockerToolsDocs)
[Other Azure tools] (https://azure.microsoft.com/en-us/tools/)

Двоичные данные
images/submission-flow.PNG Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 50 KiB

29
node/4.4.7/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:4.4.7
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/4.4.7/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/4.4.7/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/4.5.0/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:4.5.0
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/4.5.0/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/4.5.0/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/4.8.3/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:4.8.3
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/4.8.3/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/4.8.3/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/4.8.4/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:4.8.4
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/4.8.4/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/4.8.4/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/6.10.3/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:6.10.3
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/6.10.3/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/6.10.3/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/6.11.0/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:6.11.0
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/6.11.0/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/6.11.0/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/6.11.1/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:6.11.1
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/6.11.1/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/6.11.1/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/6.11.5/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:6.11.5
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/6.11.5/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/6.11.5/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/6.2.2/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:6.2.2
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/6.2.2/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/6.2.2/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/6.6.0/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:6.6.0
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/6.6.0/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,31 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
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)
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/6.6.0/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

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

@ -0,0 +1,15 @@
{
"name": "default-static-site",
"version": "1.0.0",
"description": "Express-driven static site hosted from default App Service wwwroot directory",
"main": "default-static-site.js",
"dependencies": {
"express": "4.15.3"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Azure App Services Container Images <appsvc-images@microsoft.com>",
"license": "Apache-2.0"
}

29
node/6.9.3/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,29 @@
FROM node:6.9.3
MAINTAINER Azure App Services Container Images <appsvc-images@microsoft.com>
COPY startup /opt/startup
COPY hostingstart.html /home/site/wwwroot/hostingstart.html
COPY sshd_config /etc/ssh/
RUN npm install -g pm2 \
&& mkdir -p /home/LogFiles \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc \
&& apt update \
&& apt install -y --no-install-recommends openssh-server vim curl wget tcptraceroute \
&& cd /opt/startup \
&& npm install \
&& chmod 755 /opt/startup/init_container.sh
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
WORKDIR /home/site/wwwroot
ENTRYPOINT ["/opt/startup/init_container.sh"]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

15
node/6.9.3/sshd_config Normal file
Просмотреть файл

@ -0,0 +1,15 @@
# This is ssh server systemwide configuration file.
#
# /etc/sshd_config
Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes

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

@ -0,0 +1,7 @@
var express = require('express');
var server = express();
var options = {
index: 'hostingstart.html'
};
server.use('/', express.static('/home/site/wwwroot', options));
server.listen(process.env.PORT);

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

@ -0,0 +1,59 @@
#!/usr/bin/env node
const fs = require('fs'),
util = require('util');
console.log("Generating app startup command");
const DEFAULTAPP = "/opt/startup/default-static-site.js";
const CMDFILE = "/opt/startup/startupCommand";
var httpLoggingEnabled = process.env.HTTP_LOGGING_ENABLED;
httpLoggingEnabled = (typeof httpLoggingEnabled !== 'undefined'
&& httpLoggingEnabled !== null
&& (httpLoggingEnabled.toLowerCase() === 'true' || httpLoggingEnabled.toLowerCase() === '1'))
var roleInstanceId = '';
if (typeof process.env.WEBSITE_ROLE_INSTANCE_ID !== 'undefined'
&& process.env.WEBSITE_ROLE_INSTANCE_ID !== null) {
roleInstanceId = process.env.WEBSITE_ROLE_INSTANCE_ID;
}
var startupCommand = fs.readFileSync(CMDFILE, 'utf8').trim();
// No user-provided startup command, check for scripts.start
if (!startupCommand) {
var packageJsonPath = "/home/site/wwwroot/package.json";
var json = fs.existsSync(packageJsonPath) && JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
if (typeof json == 'object' && typeof json.scripts == 'object' && typeof json.scripts.start == 'string') {
console.log("Found scripts.start in package.json")
startupCommand = 'npm start';
}
}
// No scripts.start; can we autodetect an app?
if (!startupCommand) {
var autos = ['bin/www', 'server.js', 'app.js', 'index.js', 'hostingstart.js'];
for (var i = 0; i < autos.length; i++) {
var filename = "/home/site/wwwroot/" + autos[i];
if (fs.existsSync(filename)) {
console.log("No startup command entered, but found " + filename);
startupCommand = "pm2 start " + filename+ " --no-daemon";
break;
}
}
}
// Still nothing, run the default static site
if (!startupCommand) {
console.log("No startup command or autodetected startup script " +
"found. Running default static site.");
startupCommand = "pm2 start " + DEFAULTAPP + " --no-daemon";
}
if (startupCommand && fs.existsSync(startupCommand)) {
// Run with pm2
startupCommand = "pm2 start " + startupCommand + " --no-daemon";
}
// Write to file
fs.writeFileSync(CMDFILE, startupCommand);

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

@ -0,0 +1,28 @@
#!/usr/bin/env bash
cat >/etc/motd <<EOL
_____
/ _ \ __________ _________ ____
/ /_\ \\___ / | \_ __ \_/ __ \
/ | \/ /| | /| | \/\ ___/
\____|__ /_____ \____/ |__| \___ >
\/ \/ \/
A P P S E R V I C E O N L I N U X
Documentation: http://aka.ms/webapp-linux
NodeJS quickstart: https://aka.ms/node-qs
EOL
cat /etc/motd
service ssh start
mkdir "$PM2HOME"
chmod 777 "$PM2HOME"
ln -s /home/LogFiles "$PM2HOME"/logs
echo "$@" > /opt/startup/startupCommand
node /opt/startup/generateStartupCommand.js
STARTUPCOMMAND=$(cat /opt/startup/startupCommand)
echo "Running $STARTUPCOMMAND"
eval "exec $STARTUPCOMMAND"

216
node/6.9.3/startup/npm-shrinkwrap.json сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,216 @@
{
"name": "default-static-site",
"version": "1.0.0",
"dependencies": {
"accepts": {
"version": "1.3.3",
"from": "accepts@>=1.3.3 <1.4.0",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz"
},
"array-flatten": {
"version": "1.1.1",
"from": "array-flatten@1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz"
},
"content-disposition": {
"version": "0.5.2",
"from": "content-disposition@0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz"
},
"content-type": {
"version": "1.0.2",
"from": "content-type@>=1.0.2 <1.1.0",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz"
},
"cookie": {
"version": "0.3.1",
"from": "cookie@0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz"
},
"cookie-signature": {
"version": "1.0.6",
"from": "cookie-signature@1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz"
},
"debug": {
"version": "2.6.7",
"from": "debug@2.6.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz"
},
"depd": {
"version": "1.1.0",
"from": "depd@>=1.1.0 <1.2.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz"
},
"destroy": {
"version": "1.0.4",
"from": "destroy@>=1.0.4 <1.1.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz"
},
"ee-first": {
"version": "1.1.1",
"from": "ee-first@1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
},
"encodeurl": {
"version": "1.0.1",
"from": "encodeurl@>=1.0.1 <1.1.0",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz"
},
"escape-html": {
"version": "1.0.3",
"from": "escape-html@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz"
},
"etag": {
"version": "1.8.0",
"from": "etag@>=1.8.0 <1.9.0",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz"
},
"express": {
"version": "4.15.3",
"from": "express@4.15.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.15.3.tgz"
},
"finalhandler": {
"version": "1.0.3",
"from": "finalhandler@>=1.0.3 <1.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz"
},
"forwarded": {
"version": "0.1.0",
"from": "forwarded@>=0.1.0 <0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz"
},
"fresh": {
"version": "0.5.0",
"from": "fresh@0.5.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz"
},
"http-errors": {
"version": "1.6.1",
"from": "http-errors@>=1.6.1 <1.7.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz"
},
"inherits": {
"version": "2.0.3",
"from": "inherits@2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
},
"ipaddr.js": {
"version": "1.3.0",
"from": "ipaddr.js@1.3.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz"
},
"media-typer": {
"version": "0.3.0",
"from": "media-typer@0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
},
"merge-descriptors": {
"version": "1.0.1",
"from": "merge-descriptors@1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz"
},
"methods": {
"version": "1.1.2",
"from": "methods@>=1.1.2 <1.2.0",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz"
},
"mime": {
"version": "1.3.4",
"from": "mime@1.3.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
},
"mime-db": {
"version": "1.27.0",
"from": "mime-db@>=1.27.0 <1.28.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz"
},
"mime-types": {
"version": "2.1.15",
"from": "mime-types@>=2.1.11 <2.2.0",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz"
},
"ms": {
"version": "2.0.0",
"from": "ms@2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
},
"negotiator": {
"version": "0.6.1",
"from": "negotiator@0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz"
},
"on-finished": {
"version": "2.3.0",
"from": "on-finished@>=2.3.0 <2.4.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz"
},
"parseurl": {
"version": "1.3.1",
"from": "parseurl@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz"
},
"path-to-regexp": {
"version": "0.1.7",
"from": "path-to-regexp@0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz"
},
"proxy-addr": {
"version": "1.1.4",
"from": "proxy-addr@>=1.1.4 <1.2.0",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz"
},
"qs": {
"version": "6.4.0",
"from": "qs@6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz"
},
"range-parser": {
"version": "1.2.0",
"from": "range-parser@>=1.2.0 <1.3.0",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz"
},
"send": {
"version": "0.15.3",
"from": "send@0.15.3",
"resolved": "https://registry.npmjs.org/send/-/send-0.15.3.tgz"
},
"serve-static": {
"version": "1.12.3",
"from": "serve-static@1.12.3",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.3.tgz"
},
"setprototypeof": {
"version": "1.0.3",
"from": "setprototypeof@1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz"
},
"statuses": {
"version": "1.3.1",
"from": "statuses@>=1.3.1 <1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz"
},
"type-is": {
"version": "1.6.15",
"from": "type-is@>=1.6.15 <1.7.0",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz"
},
"unpipe": {
"version": "1.0.0",
"from": "unpipe@>=1.0.0 <1.1.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
},
"utils-merge": {
"version": "1.0.0",
"from": "utils-merge@1.0.0",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz"
},
"vary": {
"version": "1.1.1",
"from": "vary@>=1.1.1 <1.2.0",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz"
}
}
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше