-
-
Save berkayakcay/914fdaa70a8f9e323c7e6100fb121882 to your computer and use it in GitHub Desktop.
Run multiple service with supervisor in container - Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#base image (with java) https://cloud.docker.com/u/nesbilgi/repository/docker/nesbilgi/alpine | |
FROM nesbilgi/alpine:aspnetcore-2.2.5 AS base | |
WORKDIR /app | |
FROM microsoft/dotnet:2.2-sdk AS build | |
WORKDIR /src | |
COPY src/MyApplication.csproj MyApplication/ | |
FROM build AS publish | |
WORKDIR /src/MyApplication | |
RUN dotnet publish MyApplication.csproj -c Release -o /app | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app . | |
# SECOND SERVICE | |
COPY /ext/second-service.jar /ext/second-service.jar | |
# SUPERVISOR | |
RUN mkdir -p /var/run/java/ /var/run/dotnet/ | |
COPY /scripts/supervisor-kill-container.py /scripts/supervisor-kill-container.py | |
COPY /src/MyApplication/supervisord.conf /etc/supervisor/supervisord.conf | |
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment