dockerfile - docker build image process error
PHP中文网
PHP中文网 2017-05-16 13:17:45
0
2
1695

The error is reported as follows:
container_linux.go:247: starting container process caused "exec: "/bin/sh": stat /bin/sh: no such file or directory"

Dockerfile content is as follows:

FROM tiangolo/uwsgi-nginx:latest

MAINTAINER Sebastian Ramirez <tiangolo@gmail.com>

# Add app configuration to Nginx
COPY nginx.conf /etc/nginx/conf.d/

# install redis and start
COPY redis-install.sh /tmp/
RUN chmod +x /tmp/redis-install.sh
RUN /bin/sh /tmp/redis-install.sh

COPY startserver.sh /tmp/
RUN chmod +x /tmp/startserver.sh


# install mongodb
# Create the MongoDB data directory
RUN mkdir -p /data/db
# Import MongoDB public GPG key AND create a MongoDB list file
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list
# Update apt-get sources AND install MongoDB
RUN apt-get update
RUN apt-get install -y -q mongodb-org ; echo 'after'

COPY requirement.txt /tmp/
RUN pip install -r /tmp/requirement.txt


ENTRYPOINT ["/bin/bash"]

Found when executing docker build -t debug .
I don’t know what went wrong. I hope you can help me find it

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
某草草

Can you post the complete error message? The error message you reported was changed to /bin/bash when docker run this container

刘奇

RUN /bin/sh /tmp/redis-install.sh/bin/sh is called in this command, but this file should not be in your base image. It is recommended to check the base image or replace the base image

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template