forked from Azure/device-simulation-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (20 loc) · 908 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
FROM microsoft/dotnet:2.0.3-runtime-jessie
MAINTAINER Devis Lucato (https://github.com/dluc)
LABEL Tags="Azure,IoT,Solutions,Simulation,.NET"
COPY . /app/
WORKDIR /app
RUN \
# Ensures the entry point is executable
chmod ugo+x /app/run.sh && \
# Allow user to mount custom files in /add/data.
# Both web service and simulation agent have a copy of the "data" folder,
# inherited from the Service project. This remove the two copies and move
# the files in /app/data, which is the folder that can be mounted to
# provide custom device models and/or customized scripts.
mv /app/webservice/data /app && \
cd /app/webservice && rm -fR data && ln -s /app/data && \
cd /app/simulationagent && rm -fR data && ln -s /app/data && \
# Clean up destination folder
rm -f /app/Dockerfile /app/.dockerignore
VOLUME ["/app/data"]
ENTRYPOINT ["/bin/bash", "/app/run.sh"]