dotnet / dotnet-docker

Docker images for .NET and the .NET Tools.
https://hub.docker.com/_/microsoft-dotnet
MIT License
4.49k stars 1.94k forks source link

microsoft/dotnet:1.0.0-preview2-sdk is not working anymore #97

Closed tim-cools closed 8 years ago

tim-cools commented 8 years ago

Steps to reproduce the issue

  1. Create following docker file:
FROM microsoft/dotnet:1.0.0-preview2-sdk

RUN dotnet new
RUN dotnet restore

Expected behavior

An empty app should be created in in the container and the packages restored.

Actual behavior (docker hub)

Building in Docker Cloud's infrastructure...
Starting to clone
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
Cloning done
Starting Build
KernelVersion: 4.4.0-31-generic
Os: linux
BuildTime: 2016-06-01T22:00:43.211343203+00:00
ApiVersion: 1.23
Version: 1.11.2
GitCommit: b9f10c9
Arch: amd64
GoVersion: go1.5.4
Starting build of index.docker.io/timcools/XXX...
Step 1 : FROM microsoft/dotnet:1.0.0-preview2-sdk
 ---> ce71ea5acc55
Step 2 : RUN dotnet new
 ---> Running in f2acf73b6f92
Created new C# project in /.
 ---> 451cb2a09a95
Removing intermediate container f2acf73b6f92
Step 3 : RUN dotnet restore
 ---> Running in 63ebcb9169be
error: Could not find a part of the path '/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/root/proc/5/fd/70'.
Removing intermediate container 63ebcb9169be
The command '/bin/sh -c dotnet restore' returned a non-zero code: 1

Actual behavior (local)

$ docker build .
Sending build context to Docker daemon 4.608 kB
Step 1 : FROM microsoft/dotnet:1.0.0-preview2-sdk
1.0.0-preview2-sdk: Pulling from microsoft/dotnet
357ea8c3d80b: Pull complete
52befadefd24: Pull complete
3c0732d5313c: Pull complete
e6e56418a7e4: Pull complete
cff52ced559d: Pull complete
6bf3d7845917: Pull complete
Digest: sha256:f16bf483f864d97b623f3cccb0ad7a51521777b28e6c2276db904c2aa2010477
Status: Downloaded newer image for microsoft/dotnet:1.0.0-preview2-sdk
 ---> ce71ea5acc55
Step 2 : RUN dotnet new
 ---> Running in 1bfe4020ea1f
Created new C# project in /.
 ---> 8e5834be344c
Removing intermediate container 1bfe4020ea1f
Step 3 : RUN dotnet restore
 ---> Running in 5595023960b6

The build keeps hanging at the restore.

$ docker version
Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 23:54:00 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 23:54:00 2016
 OS/Arch:      linux/amd64
$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 1.12.0
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 7
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: overlay bridge host null
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.16-boot2docker
Operating System: Boot2Docker 1.12.0 (TCL 7.2); HEAD : e030bab - Fri Jul 29 00:29:14 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 995.9 MiB
Name: default
ID: TBFV:GAXB:Z5UC:NYTT:6M2B:RF42:QZMJ:KGQP:PIDP:B3DA:NLDY:HZJT
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 13
 Goroutines: 24
 System Time: 2016-08-10T21:04:44.136265722Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
Insecure Registries:
 127.0.0.0/8

Additional information

This used to work some days ago as far as I know.

MichaelSimons commented 8 years ago

@tim-cools, See the known issue for not being able to restore a project located at the root.

Try the following instead

FROM microsoft/dotnet:1.0.0-preview2-sdk
RUN mkdir dotnetapp
WORKDIR dotnetapp
RUN dotnet new
RUN dotnet restore
RUN dotnet run
tim-cools commented 8 years ago

@MichaelSimons thanks a lot. I was using WORKDIR home before in my Dockerfile, but stripped it out when looking for another issue.