-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 930 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (25 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM buildpack-deps:trusty-scm
MAINTAINER Timo Snel
# dotnet CLI
ENV DOTNET_VERSION=1.0.0-rc2-002673
ENV LTTNG_UST_REGISTER_TIMEOUT 0
RUN echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list \
&& apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-dev-${DOTNET_VERSION} \
&& rm -rf /var/lib/apt/lists/*
# Set environment variables
ENV ASPNETCORE_URLS="http://*:5000"
ENV ASPNETCORE_ENVIRONMENT="Staging"
# Required for dotnet-watch to detect file changes
ENV USE_POLLING_FILE_WATCHER=1
# Copy files to app directory
COPY . /app
# Set working directory
WORKDIR /app
# Restore NuGet packages
RUN ["dotnet", "restore"]
# Open up port
EXPOSE 5000
# Specify a url with a wildcard for the host name
ENTRYPOINT ["/bin/bash", "-c", "dotnet watch"]