Skip to content

Instantly share code, notes, and snippets.

@asizikov
Last active September 29, 2020 11:07
Show Gist options
  • Save asizikov/05bc249e0c6ecbd66a85b9da89427c20 to your computer and use it in GitHub Desktop.
Save asizikov/05bc249e0c6ecbd66a85b9da89427c20 to your computer and use it in GitHub Desktop.
This is a bad docker file, don't use it.
# This is a bad docker file, don't use it.
FROM mcr.microsoft.com/dotnet/core/sdk:3.1
ARG VERSION="0.0.0.0-local"
ARG CREATED=unknown
WORKDIR /app
COPY . ./
RUN ls -a
RUN dotnet restore
RUN dotnet test
RUN dotnet publish -c Release -o output
EXPOSE 80
ENV ECHO_APP_NAME=default
ENV ASPNETCORE_URLS=http://+:80
ENV DOTNET_RUNNING_IN_CONTAINER=true
LABEL org.opencontainers.image.created="${CREATED}"
LABEL org.opencontainers.image.authors="https://github.com/<name>"
LABEL org.opencontainers.image.source="https://github.com/<name>/<reposotory>"
LABEL org.opencontainers.image.version="${VERSION}"
WORKDIR /app/output
ENTRYPOINT ["dotnet", "Echo.Api.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment