-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.dev
More file actions
54 lines (39 loc) · 1.42 KB
/
Dockerfile.dev
File metadata and controls
54 lines (39 loc) · 1.42 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
44
45
46
47
48
49
50
51
52
53
54
# Development Dockerfile with hot reload and debugging support
# Stage 1: .NET Core API Development
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS api-dev
WORKDIR /app
# Install debugging tools
RUN apt-get update && apt-get install -y \
procps \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install .NET Core debugging tools
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l /vsdbg
# Copy API project file and restore
COPY CryptoBot.Api/*.csproj ./CryptoBot.Api/
WORKDIR /app/CryptoBot.Api
RUN dotnet restore
# Copy Model project (API dependency)
COPY CryptoBot.Model/ /src/CryptoBot.Model/
# Set environment for development
ENV ASPNETCORE_ENVIRONMENT=Development
ENV DOTNET_USE_POLLING_FILE_WATCHER=1
# Expose ports for API and debugger
EXPOSE 5000 5001
# Use dotnet watch for hot reload
ENTRYPOINT ["dotnet", "watch", "run", "--urls", "http://0.0.0.0:5000;https://0.0.0.0:5001"]
# Stage 2: Angular UI Development
FROM node:14-alpine AS ui-dev
WORKDIR /app
# Install Angular CLI globally
RUN npm install -g @angular/cli@4.3.1
# Copy package files
COPY CryptoBot.UI/package*.json ./
# Install dependencies
RUN npm ci
# Copy UI source (will be overridden by volume mount)
COPY CryptoBot.UI/ .
# Expose Angular dev server and live reload ports
EXPOSE 3003 49153
# Start Angular dev server with host binding for Docker
CMD ["npm", "run", "start", "--", "--host", "0.0.0.0", "--port", "3003", "--poll", "2000"]