Skip to content

Instantly share code, notes, and snippets.

@0x414c49
Created January 8, 2020 08:44
Show Gist options
  • Save 0x414c49/a56ae0c413034f9256a799450464b0a7 to your computer and use it in GitHub Desktop.
Save 0x414c49/a56ae0c413034f9256a799450464b0a7 to your computer and use it in GitHub Desktop.
Self-contained ASPNet Core App on Docker Alpine Linux base image
FROM alpine:3.9.4
# Add some libs required by .NET runtime
# https://github.com/dotnet/core/blob/master/Documentation/build-and-install-rhel6-prerequisites.md#troubleshooting
RUN apk add --no-cache \
openssh libunwind \
nghttp2-libs libidn krb5-libs libuuid lttng-ust zlib \
libstdc++ libintl \
icu
EXPOSE 80
EXPOSE 443
# Copy
WORKDIR /app
COPY ./publish ./
ENTRYPOINT ["./MyWebApp", "--urls", "http://0.0.0.0:80"]
@emmysteven
Copy link

Thanks for sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment