Skip to content

Commit f45965f

Browse files
committed
Update Dockerfile calling syntax
1 parent 052bdf1 commit f45965f

File tree

4 files changed

+82
-8
lines changed

4 files changed

+82
-8
lines changed

samples/latest/HelloMvc/Dockerfile

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
1-
FROM microsoft/aspnet
1+
FROM ubuntu:14.04
22

3-
COPY project.json /app/
3+
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
4+
RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
5+
6+
ENV DNX_USER_HOME /opt/dnx
7+
8+
RUN apt-get -qq update && apt-get -qqy install curl unzip mono-complete
9+
10+
RUN curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_USER_HOME=$DNX_USER_HOME DNX_BRANCH=v$DNX_VERSION sh
11+
RUN bash -c "source $DNX_USER_HOME/dnvm/dnvm.sh \
12+
&& dnvm upgrade -u \
13+
&& dnvm alias default | xargs -i ln -s $DNX_USER_HOME/runtimes/{} $DNX_USER_HOME/runtimes/default"
14+
15+
# Install libuv for Kestrel from source code (binary is not in wheezy and one in jessie is still too old)
16+
RUN apt-get -qqy install \
17+
autoconf \
18+
automake \
19+
build-essential \
20+
libtool
21+
22+
RUN LIBUV_VERSION=1.4.2 \
23+
&& curl -sSL https://github.com/libuv/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \
24+
&& cd /usr/local/src/libuv-$LIBUV_VERSION \
25+
&& sh autogen.sh && ./configure && make && make install \
26+
&& rm -rf /usr/local/src/libuv-$LIBUV_VERSION \
27+
&& ldconfig
28+
29+
ENV PATH $PATH:$DNX_USER_HOME/runtimes/default/bin
30+
31+
ENV MONO_THREADS_PER_CPU 20
32+
33+
COPY . /app
434
WORKDIR /app
535
RUN ["dnu", "restore"]
6-
COPY . /app
736

837
EXPOSE 5004
9-
ENTRYPOINT ["dnx", "project.json", "kestrel"]
38+
ENTRYPOINT ["dnx", "kestrel"]

samples/latest/HelloMvc/NuGet.Config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2" />
6+
<add key="NuGetorg" value="https://nuget.org/api/v2/" />
7+
</packageSources>
8+
</configuration>

samples/latest/HelloWeb/Dockerfile

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
1-
FROM microsoft/aspnet
1+
FROM ubuntu:14.04
22

3-
COPY project.json /app/
3+
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
4+
RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
5+
6+
ENV DNX_USER_HOME /opt/dnx
7+
8+
RUN apt-get -qq update && apt-get -qqy install curl unzip mono-complete
9+
10+
RUN curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_USER_HOME=$DNX_USER_HOME DNX_BRANCH=v$DNX_VERSION sh
11+
RUN bash -c "source $DNX_USER_HOME/dnvm/dnvm.sh \
12+
&& dnvm upgrade -u \
13+
&& dnvm alias default | xargs -i ln -s $DNX_USER_HOME/runtimes/{} $DNX_USER_HOME/runtimes/default"
14+
15+
# Install libuv for Kestrel from source code (binary is not in wheezy and one in jessie is still too old)
16+
RUN apt-get -qqy install \
17+
autoconf \
18+
automake \
19+
build-essential \
20+
libtool
21+
22+
RUN LIBUV_VERSION=1.4.2 \
23+
&& curl -sSL https://github.com/libuv/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \
24+
&& cd /usr/local/src/libuv-$LIBUV_VERSION \
25+
&& sh autogen.sh && ./configure && make && make install \
26+
&& rm -rf /usr/local/src/libuv-$LIBUV_VERSION \
27+
&& ldconfig
28+
29+
ENV PATH $PATH:$DNX_USER_HOME/runtimes/default/bin
30+
31+
ENV MONO_THREADS_PER_CPU 20
32+
33+
COPY . /app
434
WORKDIR /app
535
RUN ["dnu", "restore"]
6-
COPY . /app
736

837
EXPOSE 5004
9-
ENTRYPOINT ["dnx", "project.json", "kestrel"]
38+
ENTRYPOINT ["dnx", "kestrel"]

samples/latest/HelloWeb/NuGet.Config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2" />
6+
<add key="NuGetorg" value="https://nuget.org/api/v2/" />
7+
</packageSources>
8+
</configuration>

0 commit comments

Comments
 (0)