Skip to content

Commit

Permalink
(feat) Add Dockerfile for tun bot in local
Browse files Browse the repository at this point in the history
  • Loading branch information
ALArvi019 committed Feb 3, 2024
1 parent a3736ce commit a79e309
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Use the official .NET SDK image with version 6.0 as the base image
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build

# Set the working directory in the container
WORKDIR /var/www/poisncopy

# Copy only the necessary files for restoring dependencies
COPY *.csproj .
RUN dotnet restore

# Copy the entire project and build it
COPY . .
RUN dotnet build --configuration Release

# Publish the application
RUN dotnet publish -c Release -o out

# Use the official .NET runtime image with version 6.0 as the base image
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime

# Set the working directory in the container
WORKDIR /var/www/poisncopy

# Copy the published application to the container
COPY --from=build /var/www/poisncopy/out .

# Start the application
ENTRYPOINT ["/usr/bin/dotnet", "/var/www/poisncopy/PoisnCopy.dll"]




# How to build and run the Docker image

# 1. Build the Docker image
# docker build -t poisncopy:latest .

# 2. Run the Docker image
# docker run poisncopy:latest

# 3. Enjoy !!!

0 comments on commit a79e309

Please sign in to comment.