Coder Social home page Coder Social logo

Comments (17)

forki avatar forki commented on July 17, 2024 1

Ok thanks to @mastoj we found out that you need to put it into a subfolder inside the container. Then things work. Weird

from safe-bookstore.

Petermarcu avatar Petermarcu commented on July 17, 2024

Are you publishing the application? Can you share your steps for building the application (server.dll)?

from safe-bookstore.

forki avatar forki commented on July 17, 2024

@Petermarcu as written above build.cmd publish

from safe-bookstore.

forki avatar forki commented on July 17, 2024

build.sh publish on Linux/MacOs

from safe-bookstore.

Petermarcu avatar Petermarcu commented on July 17, 2024

Ok, I missed that. Looks like you are running dotnet publish as expected. You also have the PackageReference to the FSharp SDK in your Server project.

You say that it runs from the deploy. That is what I'd expect since that is where you seem to have specified to publish the application to? The contents of your deploy dir are what you should be copying into the image and executing.

from safe-bookstore.

mastoj avatar mastoj commented on July 17, 2024

Maybe this might help: https://github.com/mastoj/suavecore

A small sample app running suave on core on docker I made.

from safe-bookstore.

forki avatar forki commented on July 17, 2024

@mastoj can you see anything that I might be doing wrong?

from safe-bookstore.

forki avatar forki commented on July 17, 2024

@Petermarcu I copy the full deploy dir into the container. (first I copy the Dockerfile to /deploy and then I run docker build over there)

from safe-bookstore.

forki avatar forki commented on July 17, 2024

@Petermarcu I pushed the docker image to dockerhub at forki/fable-suave if you want to inspect the end result

from safe-bookstore.

forki avatar forki commented on July 17, 2024

Summoning @glennc (@shanselman told me you might know)

from safe-bookstore.

mastoj avatar mastoj commented on July 17, 2024

@forki, can't spot anything obvious. If it helps, here are the commands I run: https://github.com/mastoj/suavecore/blob/master/commands

you can skip the gcloud and kubectl stuff

from safe-bookstore.

forki avatar forki commented on July 17, 2024

@mastoj why do you have dotnet run before the docker build? Needed?

from safe-bookstore.

forki avatar forki commented on July 17, 2024

Also I'm using rc4 of the dotnet cli with MSBuild. So no project.json

from safe-bookstore.

mastoj avatar mastoj commented on July 17, 2024

@forki I see that the "script" might be a little bit confusing, that's because it is not a script just a file with commands that I used while playing around.

from safe-bookstore.

forki avatar forki commented on July 17, 2024

from safe-bookstore.

mastoj avatar mastoj commented on July 17, 2024

That I don't know. I can't see what the problem is, mainly because I can't build the project on OSX. It shouldn't make a difference if you have project.json, at least that's what I thought.

What I needed to do, when I played with it was this (if I recall correctly):

dotnet build
dotnet publish -c Release

The I used the published bits in the container:

FROM microsoft/dotnet:core
COPY ./bin/Release/netcoreapp1.0/publish /app
WORKDIR /app
EXPOSE 8083
ENTRYPOINT ["dotnet", "suavecore.dll"]

Of course I struggled to get the correct .NET Core version, tooling etc. to get it to work, but after that it worked like a charm.

from safe-bookstore.

forki avatar forki commented on July 17, 2024

but that's exactly what we do here!?

@mastoj why is the build not working for you?

from safe-bookstore.

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.