-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.release
More file actions
33 lines (26 loc) · 1.04 KB
/
Dockerfile.release
File metadata and controls
33 lines (26 loc) · 1.04 KB
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
FROM microsoft/dotnet:2.1.1-aspnetcore-runtime-stretch-slim
# Install the AWS CLI
RUN apt-get update && \
mkdir -p /usr/share/man/man1 /usr/share/man/man7 && \
apt-get install -y postgresql-client-9.6 && \
apt-get -y install python curl unzip && cd /tmp && \
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" \
-o "awscli-bundle.zip" && \
unzip awscli-bundle.zip && \
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws && \
rm awscli-bundle.zip && rm -rf awscli-bundle
# Copy our code to the "/app" folder in our container
WORKDIR /app
COPY ./published/release .
# Expose port 5000 for the Web API traffic
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
ENV ASPNETCORE_ENVIRONMENT Production
ENV CONNECTIONSTRINGNAME ConnectionString_Postgres
COPY ./Scripts/secrets-entrypoint.sh /secrets-entrypoint.sh
COPY ./Scripts/RestoreDB.sh /RestoreDB.sh
COPY ./Scripts/MigrateDB.sh /MigrateDB.sh
RUN chmod +x /MigrateDB.sh
RUN mkdir Migrations
COPY ./Scripts/Migrations /Migrations
ENTRYPOINT ["/secrets-entrypoint.sh"]