Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions 1.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oryx/dotnetcore:1.0-20190730.1
FROM mcr.microsoft.com/oryx/dotnetcore:1.0-20191018.1
LABEL maintainer="Azure App Services Container Images <appsvc-images@microsoft.com>"

RUN apt-get update \
Expand All @@ -10,12 +10,16 @@ RUN apt-get update \
curl \
wget \
tcptraceroute \
net-tools \
dnsutils \
tcpdump \
iproute2 \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /defaulthome/hostingstart \
&& mkdir -p /home/LogFiles/ \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc
&& echo "cd /home" >> /root/.bashrc

COPY bin.zip /tmp
RUN unzip -q -o /tmp/bin.zip -d /defaulthome/hostingstart \
Expand Down Expand Up @@ -45,6 +49,14 @@ ENV PATH ${PATH}:/home/site/wwwroot
ENV ASPNETCORE_URLS=
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true

# Enable automatic creation of dumps when a process crashes
ENV COMPlus_DbgEnableMiniDump="1"
# Create a base directory for dumps under /home so that the
# dumps are accessible from the build container too (since a runtime container might have already crashed)
ENV DUMP_DIR="/home/logs/dumps"
RUN mkdir -p "$DUMP_DIR"
RUN chmod 777 "$DUMP_DIR"

WORKDIR /home/site/wwwroot

ENTRYPOINT ["/bin/init_container.sh"]
5 changes: 5 additions & 0 deletions 1.0/init_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/
sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config
/usr/sbin/sshd

# Format : coredump.hostname.processid.time
# Example: coredump.7d77b4ff1fea.15.1571222166
containerName=`hostname`
export COMPlus_DbgMiniDumpName="$DUMP_DIR/coredump.$containerName.%d.$(date +%s)"

appPath="/home/site/wwwroot"
runFromPath="/tmp/webapp"
startupCommandPath="/opt/startup/startup.sh"
Expand Down
16 changes: 14 additions & 2 deletions 1.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oryx/dotnetcore:1.1-20190730.1
FROM mcr.microsoft.com/oryx/dotnetcore:1.1-20191018.1
LABEL maintainer="Azure App Services Container Images <appsvc-images@microsoft.com>"

RUN apt-get update \
Expand All @@ -10,12 +10,16 @@ RUN apt-get update \
curl \
wget \
tcptraceroute \
net-tools \
dnsutils \
tcpdump \
iproute2 \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /defaulthome/hostingstart \
&& mkdir -p /home/LogFiles/ \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc
&& echo "cd /home" >> /root/.bashrc

COPY bin.zip /tmp
RUN unzip -q -o /tmp/bin.zip -d /defaulthome/hostingstart \
Expand Down Expand Up @@ -45,6 +49,14 @@ ENV PATH ${PATH}:/home/site/wwwroot
ENV ASPNETCORE_URLS=
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true

# Enable automatic creation of dumps when a process crashes
ENV COMPlus_DbgEnableMiniDump="1"
# Create a base directory for dumps under /home so that the
# dumps are accessible from the build container too (since a runtime container might have already crashed)
ENV DUMP_DIR="/home/logs/dumps"
RUN mkdir -p "$DUMP_DIR"
RUN chmod 777 "$DUMP_DIR"

WORKDIR /home/site/wwwroot

ENTRYPOINT ["/bin/init_container.sh"]
5 changes: 5 additions & 0 deletions 1.1/init_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/
sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config
/usr/sbin/sshd

# Format : coredump.hostname.processid.time
# Example: coredump.7d77b4ff1fea.15.1571222166
containerName=`hostname`
export COMPlus_DbgMiniDumpName="$DUMP_DIR/coredump.$containerName.%d.$(date +%s)"

appPath="/home/site/wwwroot"
runFromPath="/tmp/webapp"
startupCommandPath="/opt/startup/startup.sh"
Expand Down
16 changes: 14 additions & 2 deletions 2.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oryx/dotnetcore:2.0-20190730.1
FROM mcr.microsoft.com/oryx/dotnetcore:2.0-20191018.1
LABEL maintainer="Azure App Services Container Images <appsvc-images@microsoft.com>"

RUN apt-get update \
Expand All @@ -10,12 +10,16 @@ RUN apt-get update \
curl \
wget \
tcptraceroute \
net-tools \
dnsutils \
tcpdump \
iproute2 \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /defaulthome/hostingstart \
&& mkdir -p /home/LogFiles/ \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc
&& echo "cd /home" >> /root/.bashrc

COPY bin.zip /tmp
RUN unzip -q -o /tmp/bin.zip -d /defaulthome/hostingstart \
Expand Down Expand Up @@ -45,6 +49,14 @@ ENV PATH ${PATH}:/home/site/wwwroot
ENV ASPNETCORE_URLS=
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true

# Enable automatic creation of dumps when a process crashes
ENV COMPlus_DbgEnableMiniDump="1"
# Create a base directory for dumps under /home so that the
# dumps are accessible from the build container too (since a runtime container might have already crashed)
ENV DUMP_DIR="/home/logs/dumps"
RUN mkdir -p "$DUMP_DIR"
RUN chmod 777 "$DUMP_DIR"

WORKDIR /home/site/wwwroot

ENTRYPOINT ["/bin/init_container.sh"]
5 changes: 5 additions & 0 deletions 2.0/init_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/
sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config
/usr/sbin/sshd

# Format : coredump.hostname.processid.time
# Example: coredump.7d77b4ff1fea.15.1571222166
containerName=`hostname`
export COMPlus_DbgMiniDumpName="$DUMP_DIR/coredump.$containerName.%d.$(date +%s)"

appPath="/home/site/wwwroot"
runFromPath="/tmp/webapp"
startupCommandPath="/opt/startup/startup.sh"
Expand Down
2 changes: 1 addition & 1 deletion 2.0/src/hostingstart.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.7" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
</ItemGroup>

</Project>
16 changes: 14 additions & 2 deletions 2.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oryx/dotnetcore:2.1-20190730.1
FROM mcr.microsoft.com/oryx/dotnetcore:2.1-20191018.1
LABEL maintainer="Azure App Services Container Images <appsvc-images@microsoft.com>"

RUN apt-get update \
Expand All @@ -10,12 +10,16 @@ RUN apt-get update \
curl \
wget \
tcptraceroute \
net-tools \
dnsutils \
tcpdump \
iproute2 \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /defaulthome/hostingstart \
&& mkdir -p /home/LogFiles/ \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc
&& echo "cd /home" >> /root/.bashrc

COPY bin.zip /tmp
RUN unzip -q -o /tmp/bin.zip -d /defaulthome/hostingstart \
Expand Down Expand Up @@ -45,6 +49,14 @@ ENV PATH ${PATH}:/home/site/wwwroot
ENV ASPNETCORE_URLS=
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true

# Enable automatic creation of dumps when a process crashes
ENV COMPlus_DbgEnableMiniDump="1"
# Create a base directory for dumps under /home so that the
# dumps are accessible from the build container too (since a runtime container might have already crashed)
ENV DUMP_DIR="/home/logs/dumps"
RUN mkdir -p "$DUMP_DIR"
RUN chmod 777 "$DUMP_DIR"

WORKDIR /home/site/wwwroot

ENTRYPOINT ["/bin/init_container.sh"]
5 changes: 5 additions & 0 deletions 2.1/init_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/
sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config
/usr/sbin/sshd

# Format : coredump.hostname.processid.time
# Example: coredump.7d77b4ff1fea.15.1571222166
containerName=`hostname`
export COMPlus_DbgMiniDumpName="$DUMP_DIR/coredump.$containerName.%d.$(date +%s)"

appPath="/home/site/wwwroot"
runFromPath="/tmp/webapp"
startupCommandPath="/opt/startup/startup.sh"
Expand Down
2 changes: 1 addition & 1 deletion 2.1/src/hostingstart.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.4" />
</ItemGroup>

</Project>
16 changes: 14 additions & 2 deletions 2.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oryx/dotnetcore:2.2-20190730.1
FROM mcr.microsoft.com/oryx/dotnetcore:2.2-20191018.1
LABEL maintainer="Azure App Services Container Images <appsvc-images@microsoft.com>"

RUN apt-get update \
Expand All @@ -10,12 +10,16 @@ RUN apt-get update \
curl \
wget \
tcptraceroute \
net-tools \
dnsutils \
tcpdump \
iproute2 \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /defaulthome/hostingstart \
&& mkdir -p /home/LogFiles/ \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /etc/bash.bashrc
&& echo "cd /home" >> /root/.bashrc

COPY bin.zip /tmp
RUN unzip -q -o /tmp/bin.zip -d /defaulthome/hostingstart \
Expand Down Expand Up @@ -45,6 +49,14 @@ ENV PATH ${PATH}:/home/site/wwwroot
ENV ASPNETCORE_URLS=
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true

# Enable automatic creation of dumps when a process crashes
ENV COMPlus_DbgEnableMiniDump="1"
# Create a base directory for dumps under /home so that the
# dumps are accessible from the build container too (since a runtime container might have already crashed)
ENV DUMP_DIR="/home/logs/dumps"
RUN mkdir -p "$DUMP_DIR"
RUN chmod 777 "$DUMP_DIR"

WORKDIR /home/site/wwwroot

ENTRYPOINT ["/bin/init_container.sh"]
5 changes: 5 additions & 0 deletions 2.2/init_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/
sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config
/usr/sbin/sshd

# Format : coredump.hostname.processid.time
# Example: coredump.7d77b4ff1fea.15.1571222166
containerName=`hostname`
export COMPlus_DbgMiniDumpName="$DUMP_DIR/coredump.$containerName.%d.$(date +%s)"

appPath="/home/site/wwwroot"
runFromPath="/tmp/webapp"
startupCommandPath="/opt/startup/startup.sh"
Expand Down
62 changes: 62 additions & 0 deletions 3.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FROM mcr.microsoft.com/oryx/dotnetcore:3.0-20191018.1
LABEL maintainer="Azure App Services Container Images <appsvc-images@microsoft.com>"

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-utils \
unzip \
openssh-server \
vim \
curl \
wget \
tcptraceroute \
net-tools \
dnsutils \
tcpdump \
iproute2 \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /defaulthome/hostingstart \
&& mkdir -p /home/LogFiles/ \
&& echo "root:Docker!" | chpasswd \
&& echo "cd /home" >> /root/.bashrc

COPY bin.zip /tmp
RUN unzip -q -o /tmp/bin.zip -d /defaulthome/hostingstart \
&& rm /tmp/bin.zip

COPY init_container.sh /bin/
RUN chmod 755 /bin/init_container.sh

COPY hostingstart.html /defaulthome/hostingstart/wwwroot/

# configure startup
COPY sshd_config /etc/ssh/
COPY ssh_setup.sh /tmp
RUN mkdir -p /opt/startup \
&& chmod -R +x /opt/startup \
&& chmod -R +x /tmp/ssh_setup.sh \
&& (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \
&& rm -rf /tmp/*

ENV PORT 8080
ENV SSH_PORT 2222
EXPOSE 8080 2222

ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance
ENV WEBSITE_INSTANCE_ID localInstance
ENV PATH ${PATH}:/home/site/wwwroot
ENV ASPNETCORE_URLS=
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true

# Enable automatic creation of dumps when a process crashes
ENV COMPlus_DbgEnableMiniDump="1"
# Create a base directory for dumps under /home so that the
# dumps are accessible from the build container too (since a runtime container might have already crashed)
ENV DUMP_DIR="/home/logs/dumps"
RUN mkdir -p "$DUMP_DIR"
RUN chmod 777 "$DUMP_DIR"

WORKDIR /home/site/wwwroot

ENTRYPOINT ["/bin/init_container.sh"]
Binary file added 3.0/bin.zip
Binary file not shown.
7 changes: 7 additions & 0 deletions 3.0/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
cd src
sudo rm -rf bin obj publish
docker run --rm -v $(pwd):/src -w /src microsoft/dotnet:3.0-sdk /bin/bash -c "dotnet restore && dotnet publish -o publish"
cd publish
zip -r ../../bin.zip *
rm -rf ../publish ../out ../obj ../bin
51 changes: 51 additions & 0 deletions 3.0/hostingstart.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv=X-UA-Compatible content="IE=edge">
<title>Microsoft Azure App Service - Welcome</title>
<link rel="SHORTCUT ICON" href="https://c.s-microsoft.com/favicon.ico?v2" type="image/x-icon"/>
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/4.1.1/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://appservice.azureedge.net/css/linux-landing-page/v3/main.css">
<script type="text/javascript">window.onload=function(){try{var a=window.location.hostname;if(a.includes(".azurewebsites.net")){a=a.replace(".azurewebsites.net", "")}var b=document.getElementById("depCenterLink");b.setAttribute("href", b.getAttribute("href") + "&sitename=" + a);}catch(d){}}</script>
</head>
<body>
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand " href="#">
<div class="container pl-4 ml-5"> <img src="https://appservice.azureedge.net/images/linux-landing-page/v3/microsoft_azure_logo.png" width="270" height="108" alt=""> </div>
</a>
</nav>
<div class="container-fluid container-height mr-2">
<div class="pt-10 pb-10 mt-10 mb-10 d-xxs-none d-xs-none d-sm-none d-md-none d-lg-block d-xl-block" style="height:20px; width:100%; clear:both;"></div>
<div class="row">
<div class="row col-xs-12 col-sm-12 d-block d-lg-none d-xl-none d-md-block d-sm-block d-xs-block">
<div class="text-center"> <img src="https://appservice.azureedge.net/images/linux-landing-page/v3/net.svg"> </div>
</div>
<div class="extra-pl-small-scr offset-xl-1 offset-lg-1 offset-md-2 offset-sm-2 offset-xs-2 col-xl-5 col-lg-5 col-md-10 col-sm-11 col-xs-11 div-vertical-center">
<div class="container-fluid">
<div class="row">
<h2>Hey, .NET Core developers!</h2>
</div>
<br>
<div class="row">
<h4>Your app service is up and running.</h4>
</div>
<div class="row">
<h4>Time to take the next step and deploy your code.</h4>
</div>
<div class="row info-mg-top">
<p class=" pl-0 col-md-6 col-sm-12 info-mg-top">Have your code ready?<br>Use deployment center to get code published from your client or setup continuous deployment.<br><a id='depCenterLink' href="https://go.microsoft.com/fwlink/?linkid=2057852"><button class="btn btn-primary btn-mg-top" type="submit">Deployment Center</button></a></p>
<p class="pl-0 offset-md-1 col-md-5 col-sm-12 info-mg-top">Don't have your code yet?<br>Follow our quickstart guide and you'll have a full app ready in 5 minutes or less.<br><button onclick="location.href='https://go.microsoft.com/fwlink/?linkid=2057762'" class="btn btn-primary btn-mg-top" type="submit">Quickstart</button></p>
</div>
</div>
</div>
<div class="col-xl-5 col-lg-5 col-md-12 d-none d-lg-block">
<div class="text-center"> <img src="https://appservice.azureedge.net/images/linux-landing-page/v3/net.svg"> </div>
</div>
<div class="col-xl-1 col-lg-1 col-md-1"></div>
</div>
</div>
<!-- Bootstrap core JavaScript==================================================--><script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.2.1.min.js" crossorigin="anonymous"></script><script src="https://ajax.aspnetcdn.com/ajax/bootstrap/4.1.1/bootstrap.min.js" crossorigin="anonymous"></script>
</body>
</html>
Loading