Coder Social home page Coder Social logo

Comments (5)

MichaelSimons avatar MichaelSimons commented on August 17, 2024 1

The microsoft/dotnet images now come the the .NET core app packages cached. Closing issue.

from dotnet-docker.

MicahZoltu avatar MicahZoltu commented on August 17, 2024

In case anyone wants to use it, I went ahead and did this for myself:
GitHub: https://github.com/Zoltu/docker-aspnetcore
DockerHub: https://hub.docker.com/r/zoltu/aspnetcore/

Feel free to submit PRs with additional libraries you want me to add, I don't mind the size of the image (within reason) because it makes all of my other docker images build way faster (few seconds instead of many minutes).

from dotnet-docker.

MichaelSimons avatar MichaelSimons commented on August 17, 2024

There is an offline feature being added to CLI which will help .NET Core Applications. With this feature, the Dockerfile will need to be updated in order to trigger the cache to be built which happens on first use.

One potential problem that may arise the more packages that are added to the cache for ASPNET, Entity Framework, etc scenarios is that it is more likely not everyone will use or want all of these packages thus the images will be "bloated" with unnecessary artifacts. At this point it may be better to have specialized images or leave this up to the individual users to create their own layers as appropriate on top of the base image.

from dotnet-docker.

MicahZoltu avatar MicahZoltu commented on August 17, 2024

If I could do something like this in my Dockerfile, I think it would fully alleviate the need for this.

FROM microsoft/dotnet

RUN dotnet seed Microsoft.AspNetCore.Mvc 1.0.0-rc2-final
RUN dotnet seed Microsoft.EntityFrameworkCore 1.0.0-rc2-final

COPY . /
RUN dotnet build

ENTRYPOINT [ "dotnet", "run" ]

Because the "seed" operations are before copying any files into the image, docker will cache the results of those lines so it won't require running more than once per docker host.

from dotnet-docker.

MichaelSimons avatar MichaelSimons commented on August 17, 2024

@Zoltu, Please log your request for a seed command within the CLI repo. This is where the command would need to be added. Thanks

from dotnet-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.