-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
48 lines (43 loc) · 916 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
40
41
42
43
44
45
46
47
48
FROM microsoft/dotnet:2.2-sdk
WORKDIR /app
# Expose ports
EXPOSE 20/tcp
EXPOSE 20/udp
EXPOSE 21/tcp
EXPOSE 21/udp
EXPOSE 989/tcp
EXPOSE 989/udp
EXPOSE 990/tcp
EXPOSE 990/udp
EXPOSE 10000/tcp
EXPOSE 10000/udp
EXPOSE 10001/tcp
EXPOSE 10001/udp
EXPOSE 10002/tcp
EXPOSE 10002/udp
EXPOSE 10003/tcp
EXPOSE 10003/udp
EXPOSE 10004/tcp
EXPOSE 10004/udp
EXPOSE 10005/tcp
EXPOSE 10005/udp
EXPOSE 10006/tcp
EXPOSE 10006/udp
EXPOSE 10007/tcp
EXPOSE 10007/udp
EXPOSE 10008/tcp
EXPOSE 10008/udp
EXPOSE 10009/tcp
EXPOSE 10009/udp
# Copy csproj and restore as distinct layers
COPY src/GoogleStorageFtp.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY src/. ./
RUN dotnet publish -c Release -o out
# Copy PFX and service account files
COPY ftp.pfx ./
COPY my-service-account.json ./
ENV GOOGLE_APPLICATION_CREDENTIALS /app/my-service-account.json
# Run the app
ENTRYPOINT ["dotnet", "out/GoogleStorageFtp.dll"]