Update
This commit is contained in:
22
Dockerfile
22
Dockerfile
@@ -1,29 +1,29 @@
|
|||||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0.10-bookworm-slim-amd64 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0.10-bookworm-slim-amd64 AS base
|
||||||
WORKDIR /app
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
RUN apt-get -y update
|
RUN apt-get -y update
|
||||||
RUN apt-get -y install nginx
|
RUN apt-get -y install nginx
|
||||||
|
|
||||||
|
RUN mkdir /app
|
||||||
|
|
||||||
RUN mkdir /app/Front
|
RUN mkdir /app/Front
|
||||||
|
COPY Front/skydivelogs-app/dist /app/Front
|
||||||
|
|
||||||
RUN mkdir /app/API
|
RUN mkdir /app/API
|
||||||
|
COPY Back/dist /app/API
|
||||||
|
|
||||||
WORKDIR /app/Front
|
RUN rm -f /app/startup.sh
|
||||||
COPY Front/skydivelogs-app/dist .
|
COPY startup.sh /app
|
||||||
|
RUN chmod 755 /app/startup.sh
|
||||||
WORKDIR /app/API
|
|
||||||
COPY Back/dist .
|
|
||||||
|
|
||||||
COPY start-docker.sh /start-docker.sh
|
|
||||||
RUN chmod +x /start-docker.sh
|
|
||||||
|
|
||||||
RUN update-rc.d nginx defaults
|
RUN update-rc.d nginx defaults
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/sites-available/default
|
COPY nginx.conf /etc/nginx/sites-available/default
|
||||||
|
|
||||||
VOLUME /app/API/Data
|
VOLUME /app/API/Data
|
||||||
VOLUME /app/Front/config
|
VOLUME /app/Front/config
|
||||||
|
|
||||||
CMD ["/start-docker.sh"]
|
ENV ASPNETCORE_URLS http://+:5001
|
||||||
|
|
||||||
|
CMD ["sh", "/app/startup.sh"]
|
||||||
3
doc.txt
3
doc.txt
@@ -1,5 +1,6 @@
|
|||||||
To build an image "toto" with the version "0.1": docker build . -t skydivelogs:1.4.0
|
To build an image "toto" with the version "0.1": docker build . -t skydivelogs:1.4.0
|
||||||
To run ab image to container with volume : docker run -v C:\toto\logs\config:/app/Front/config -v C:\toto\logs\db:/app/API/Data -p 5080:80/tcp --name Test -it skydivelogs:0.1
|
To run ab image to container with volume :
|
||||||
|
docker run -v C:\toto\config:/app/Front/config -v C:\toto\db:/app/API/Data -d -p 5080:80/tcp --name Test -it skydivelogs:1.4.0
|
||||||
|
|
||||||
docker save --output skydivelogs-1.4.0.tar skydivelogs:1.4.0
|
docker save --output skydivelogs-1.4.0.tar skydivelogs:1.4.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
service nginx start
|
|
||||||
|
|
||||||
cd /app/API/
|
|
||||||
dotnet skydiveLogs-api.dll --verbose d --urls=http://localhost:5001
|
|
||||||
6
startup.sh
Normal file
6
startup.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
service nginx start
|
||||||
|
|
||||||
|
cd /app/API/
|
||||||
|
dotnet skydiveLogs-api.dll
|
||||||
Reference in New Issue
Block a user