docker image doesn´t work after build
If you are having an issue with microsoft/aspnet, please open an issue on https://github.com/Microsoft/aspnet-docker. This repository is for microsoft/aspnetcore and microsoft/aspnetcore-build.
Steps to reproduce the issue
(e.g. copy your Dockerfile or docker-compose.yml file here)
FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM microsoft/aspnetcore:2.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "IdentityServer.dll"]
docker-compose:
version: '3.1'
services:
identityserver:
build: ./IdentityServer/
container_name: IdentityServer
volumes:
- ./IdentityServer/:/app
environment:
- ASPNETCORE_ENVIRONMET=Development
ports:
- "5000:80"
Expected behavior
a working solution
Actual behavior
get following error message:
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
Additional information (e.g. issue happens only occasionally)
Two days ago i got this error message too and i could solved the error with the help of this thread: https://github.com/aspnet/aspnet-docker/issues/322 Today i want to run my docker setup and i get again this error message. Between two days ago and now i changed nothing. Without docker-compose the dockerfile is running perfectly. So i don´t know where could be the problem
Output of dotnet --info
.NET-Befehlszeilentools (2.1.4)
Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.4/
Microsoft .NET Core Shared Framework Host
Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
Output of docker info
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 43
Server Version: 17.12.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 57
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.60-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.609GiB
Name: linuxkit-025000000001
ID: OTQZ:HYYZ:PVVM:DMGB:S257:T4BG:RNIA:VOSK:D2P7:BS3O:7RW7:KA4M
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
HTTP Proxy: docker.for.mac.http.internal:3128
HTTPS Proxy: docker.for.mac.http.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
@eld1887, I noticed that in your docker-compose, you have specified a volume map that appears to be overriding the app you built in your dockerfile. What is the purpose of the volume map? Try removing it.
@MichaelSimons that was part from an old docker-compose file and has crept in the new one. I removed the volume map and now it seems to work. Thanks for your help