I am trying to build a docker image of a flask app using a docker file. The flask app uses a docker image of specific sql version datajoint/mysql (using docker-compose). But I get the following error:
/bin/sh: 1: docker: not found
The command '/bin/sh -c docker run -v /var/run/docker.sock:/var/run/docker.sock ...' returned a non-zero code: 127
I have also copied the docker and docker-compose to my app/ directory. Please can you help me how to install docker image and call docker from a docker file. I have gone through the following link but it doesn't address my problem directly
Dockerfile
# this is an official Python runtime, used as the parent image
FROM python:3.6.5-slim
# set the working directory in the container to /app
WORKDIR /app
# add the current directory to the container as /app
ADD . /app
# execute everyone's favorite pip command, pip install -r
RUN docker run -v /var/run/docker.sock:/var/run/docker.sock ...
RUN ./docker-compose up -d
RUN ./docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=simple datajoint/mysql
# add the current directory to the container as /app
ADD . /app
# execute everyone's favorite pip command, pip install -r
RUN pip install --trusted-host pypi.python.org -r requirements.txt
ADD /datajoint-python /datajoint-python
RUN pip install -e ../datajoint-python/
# unblock port 80 for the Flask app to run on
EXPOSE 1234
# execute the Flask app
CMD ["python", "run.py"]
Below is how amy app directory looks like
Any help is greatly appreciated.