forked from Azure-Samples/helium-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-Dev
More file actions
43 lines (31 loc) · 1.36 KB
/
Copy pathDockerfile-Dev
File metadata and controls
43 lines (31 loc) · 1.36 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
34
35
36
37
38
39
40
41
42
43
### to build the base image so it's cached
#docker build --target helium-dev-base -t helium-dev-base -f Dockerfile-Dev .
### to build the full image
#docker build -t helium-dev -f Dockerfile-Dev .
### run the image interactively mounting your .azure directory into the container
#docker run -it --rm -p 4120:4120 -v ~/.azure:/root/.azure helium-dev
### Build the developer base image
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as helium-dev-base
### Optional: Set Proxy Variables
# ENV http_proxy {value}
# ENV https_proxy {value}
# ENV HTTP_PROXY {value}
# ENV HTTPS_PROXY {value}
# ENV no_proxy {value}
# ENV NO_PROXY {value}
### install azure cli
RUN apt-get update && \
apt-get install -y apt-transport-https ca-certificates curl software-properties-common libssl-dev git wget nano lsb-release jq && \
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.asc.gpg && \
CLI_REPO=$(lsb_release -cs) && \
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ ${CLI_REPO} main" > /etc/apt/sources.list.d/azure-cli.list && \
apt-get update && \
apt-get install -y azure-cli
RUN mkdir -p /root/.azure
### build the app image
FROM helium-dev-base
### if port is changed, also update value in Constants.cs
EXPOSE 4120
### copy the source and unit tests
COPY src /src
WORKDIR /src/app