-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (26 loc) · 936 Bytes
/
Dockerfile
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
36
37
38
39
FROM microsoft/dotnet:latest
RUN \
apt-get update && \
#add-apt-repository -y ppa:nginx/stable && \
#apt-get update && \
apt-get install -y nginx && \
chown -R www-data:www-data /var/lib/nginx
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
COPY . /app
# Set the working directory as "app" directory
WORKDIR /app
# Run the following commands in Linux Terminal to restore .NET Core packages
#RUN ["dotnet", "restore"]
RUN dotnet restore
# Build the application
RUN dotnet publish -c Release -o out /app
RUN ls /app/
RUN ls /app/WebApplication1/bin/Release/netcoreapp2.0/
# Expose a port number from the container to outside world
ENV port=5000
ENV ASPNETCORE_URLS=http://+:$port
EXPOSE 80
#ENTRYPOINT ASPNETCORE_URLS='http://*:'$port dotnet /app/WebApplication1/bin/Release/netcoreapp2.0/WebApplication1.dll
#CMD ["/usr/bin/dotnet", "NotebookAppApi.dll"]
RUN update-rc.d nginx defaults
CMD ["sh", "/app/startup.sh"]