-
Notifications
You must be signed in to change notification settings - Fork 86
Description
- This is a bug reportThis is a feature requestI searched existing issues before opening this oneTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Hi, I'm beginning my journey into the world of Docker and this issue has been blocking my for the past hours.
I've searched for a similar issue in a few repositories but without success.
Expected behavior
Running a Node.js Docker image.
Actual behavior
The deamon throw an error after calling the docker run
command.
Steps to reproduce the behavior
I have a simple package.json
:
{
"name": "docker_web_app",
"version": "1.0.0",
"description": "Node.js on Docker",
"author": "First Last <first.last@example.com>",
"main": "index.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"express": "^4.16.1"
}
}
And this sample index.js
:
'use strict';
const express = require('express');
// Constants
const PORT = 8080;
const HOST = '0.0.0.0';
// App
const app = express();
app.get('/', (req, res) => {
res.send('Hello world\n');
});
app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);
My Dockerfile
is based on the Node.js documentation, with some adjustments :
# specify the node base image with your desired version node:<version>
FROM node:alpine
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
I'm simply building an image with the following command :
docker build -t thomasferro/node-web-app .
And then trying to run this image with this command :
docker run -p 8080:8080 -d thomasferro/node-web-app:latest
Nothing more than the image's id is printed into the terminal, but this message appears when adding the -i
option :
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"-i\": executable file not found in $PATH": unknown.
The docker ps
command shows that nothing has been started.
Here are the logs from the deamon, fetched via the sudo journalctl -fu docker.service
command :
mai 27 18:22:17 thomas-laptop dockerd[1862]: time="2018-05-27T18:22:17.618015409+02:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver 8.8.8.8 nameserver 8.8.4.4]"
mai 27 18:22:17 thomas-laptop dockerd[1862]: time="2018-05-27T18:22:17.618090063+02:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"
mai 27 18:22:17 thomas-laptop dockerd[1862]: time="2018-05-27T18:22:17+02:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/9876f7d4354b49506accc058f70f7fe0bb30bec5792b8fbdc132ca3693d4f065/shim.sock" debug=false module="containerd/tasks" pid=8962
mai 27 18:22:18 thomas-laptop dockerd[1862]: time="2018-05-27T18:22:18+02:00" level=info msg="shim reaped" id=9876f7d4354b49506accc058f70f7fe0bb30bec5792b8fbdc132ca3693d4f065 module="containerd/tasks"
mai 27 18:22:18 thomas-laptop dockerd[1862]: time="2018-05-27T18:22:18.434058783+02:00" level=error msg="stream copy error: reading from a closed fifo"
mai 27 18:22:18 thomas-laptop dockerd[1862]: time="2018-05-27T18:22:18.434146201+02:00" level=error msg="stream copy error: reading from a closed fifo"
mai 27 18:22:19 thomas-laptop dockerd[1862]: time="2018-05-27T18:22:19.448384711+02:00" level=error msg="9876f7d4354b49506accc058f70f7fe0bb30bec5792b8fbdc132ca3693d4f065 cleanup: failed to delete container from containerd: no such container"
Those errors seems to be the causes of the issue but I don't know how to interpret them :
mai 27 18:22:18 thomas-laptop dockerd[1862]: time="2018-05-27T18:22:18.434058783+02:00" level=error msg="stream copy error: reading from a closed fifo"
Output of docker version
:
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:17:20 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:15:30 2018
OS/Arch: linux/amd64
Experimental: false
Output of docker info
:
Containers: 44
Running: 0
Paused: 0
Stopped: 44
Images: 7
Server Version: 18.03.1-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: 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: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-20-generic
Operating System: Ubuntu 18.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.324GiB
Name: thomas-laptop
ID: 47ON:RIIN:YTNK:TOIQ:TE6R:VYVD:3EJJ:IBP6:D2DS:4WIO:TRML:UJYG
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
'use strict';
const express = require('express');
// Constants
const PORT = 8080;
const HOST = '0.0.0.0';
// App
const app = express();
app.get('/', (req, res) => {
res.send('Hello world\n');
});
app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);
WARNING: No swap limit support
I have already tried to reinstall Docker, the service, delete every images, etc, without any change.
I will be glad to provide more information if needed, thanks for your time !
Activity
fulvi0 commentedon Jul 22, 2018
I'm facing the same issue, any update about this case?
yjunsun commentedon Apr 4, 2019
the same issue to me