Comments (9)
Just try to clone the code and run docker build.
It was working but it stop working several days ago as base docker image changed.
from honosoft.dotnet.web.spa.projecttemplates.
oh sorry I see you change the url yes that should work
from honosoft.dotnet.web.spa.projecttemplates.
If you run all locally, update dotnet coreon your pc and also clean the bin/obj folders.
from honosoft.dotnet.web.spa.projecttemplates.
you need yo use official docker image to solve this problem but it steel not easy. look at the end of this page
https://hackernoon.com/docker-writing-a-smaller-net-core-image-6710f4a1562a
it has a solution for 2.2
from honosoft.dotnet.web.spa.projecttemplates.
Hi, thank you for raising the issue. I'll try to give a look tonight or over the weekend.
from honosoft.dotnet.web.spa.projecttemplates.
Hi @farshid3003 , for info, I was already using the proper docker images (officials). They changed their URI recently. That being said, I was able to make it work again by adding the runtime in the build. The final image goes to 300mb :/. I am still looking if it could be possible to have a smaller image in the end.
Here's a functional dockerfile.
####################################################
# To build your own image:
# > docker build -t honosoft/vuejs-picnic:latest -t honosoft/vuejs-picnic:1.5.0 .
# To run your image once it's ready:
# > docker run -d -p 8080:80 --name vuejs-picnic honosoft/vuejs-picnic
# To push the image into your docker repository:
# > docker push honosoft/vuejs-picnic:latest
# If you wish to remove your dangling images, please do the following (not mandatory)
# > docker rmi $(docker images -f “dangling=true” -q)
####################################################
# Build the container with Source code compiled
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine3.8 as buildenv
WORKDIR /source
RUN apk add --update nodejs nodejs-npm
COPY *.csproj .
RUN dotnet restore
COPY . .
# Publishing will also restore (install) the npm packages.
RUN dotnet publish -c Release -o /app/ -r linux-musl-x64
# Stage 2 - Creating Image for compiled app
FROM mcr.microsoft.com/dotnet/core/runtime:2.2-alpine3.8 as baseimage
RUN addgroup -S coreApp && adduser -S -G coreApp coreApp
# RUN apk add --update nodejs nodejs-npm
# Define other environment variable if needed.
ENV ASPNETCORE_URLS=http://+:$port
WORKDIR /app
COPY --from=buildenv /app .
RUN chown -R coreApp:coreApp /app
# Replace the application name if required.
ENTRYPOINT ["dotnet", "VueJs.Picnic.CSharp.dll"]
EXPOSE $port
from honosoft.dotnet.web.spa.projecttemplates.
yes you right, I think for the fix at least do something that works. don't worry about the image. image is not the container :)
so I think now you need to do something like this :
# Build runtime image
FROM microsoft/dotnet:2.2-aspnetcore-runtime As base
WORKDIR /app
EXPOSE 80
FROM microsoft/dotnet:2.2-sdk AS build-env
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND teletype
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y dist-upgrade \
&& apt-get install -y gnupg \
&& apt-get install -y sudo \
&& curl -sL deb.nodesource.com/setup_10.x | sudo -E bash - \
&& apt-get install -y nodejs
# Copy csproj and restore as distinct layers
WORKDIR /src
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . .
WORKDIR "/src"
RUN dotnet build -c Release -o /app
# publish
FROM build-env AS publish
RUN dotnet publish -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "ProjectName.dll"]
this is working now.
from honosoft.dotnet.web.spa.projecttemplates.
My example was working (just saying). I tried it locally before posting. I'll try with your proposition later.
from honosoft.dotnet.web.spa.projecttemplates.
did you try to run the app after creating docker ?
from honosoft.dotnet.web.spa.projecttemplates.
Related Issues (20)
- Webpack + Lint - Live? HOT 1
- CSS Glitch (over the overlay) HOT 1
- Bug with routes order in vue picnic css HOT 1
- Change the startup to be more pluggable HOT 1
- html webpack plugin HOT 1
- Regression: The publicPath for dist is causing webpack hot reload issue HOT 1
- Add a spinner when loading the data HOT 1
- Write a wiki for Docker + one of the template. HOT 2
- Delay on the API is too long
- Persists in vuex + localstorage the Language HOT 1
- Add a cookie message ... (you know) HOT 3
- Map file generation are not generated
- Align code with latest version of dotnet (UseSpa + AddSpaStaticFiles)
- The SPA default page middleware could not return the default page '/index.html' HOT 4
- Images in SCSS fails to have the proper URI
- todo... redesign theme with better flex css HOT 1
- Update readme - New design / Minor changes HOT 1
- Add a collapsible menu. HOT 1
- Since the left menu can collapse, we should keep the state
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honosoft.dotnet.web.spa.projecttemplates.