File tree Expand file tree Collapse file tree 4 files changed +82
-8
lines changed Expand file tree Collapse file tree 4 files changed +82
-8
lines changed Original file line number Diff line number Diff line change 1
- FROM microsoft/aspnet
1
+ FROM ubuntu:14.04
2
2
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
4
34
WORKDIR /app
5
35
RUN ["dnu" , "restore" ]
6
- COPY . /app
7
36
8
37
EXPOSE 5004
9
- ENTRYPOINT ["dnx" , "project.json" , " kestrel" ]
38
+ ENTRYPOINT ["dnx" , "kestrel" ]
Original file line number Diff line number Diff line change
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 >
Original file line number Diff line number Diff line change 1
- FROM microsoft/aspnet
1
+ FROM ubuntu:14.04
2
2
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
4
34
WORKDIR /app
5
35
RUN ["dnu" , "restore" ]
6
- COPY . /app
7
36
8
37
EXPOSE 5004
9
- ENTRYPOINT ["dnx" , "project.json" , " kestrel" ]
38
+ ENTRYPOINT ["dnx" , "kestrel" ]
Original file line number Diff line number Diff line change
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 >
You can’t perform that action at this time.
0 commit comments