Skip to content

Instantly share code, notes, and snippets.

@berkayakcay

berkayakcay/Dockerfile Secret

Created Jun 5, 2019
Embed
What would you like to do?
Run multiple service with supervisor in container - Dockerfile
#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