Reputation: 35
I have been following this tutorial about posting a Rasa chatbot on Heroku using a Docker image. I am using Windows 10, and I am new to Docker.
When I get to the step heroku container:push web -a {appname}
, it runs through the Dockerfile, but it outputs the following error:
container_linux.go:380: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory
I've tried doing some of the suggestions in other StackOverflow responses like, such as updating ubuntu, installing bash (with apt-get and apk), adding different shebangs. However, I can't seem to get the Dockerfile to run chmod or any similar commands. Here is my Dockerfile for reference.
FROM ubuntu
RUN apt-get update -y
RUN apt-get install -y bash
FROM rasa/rasa:latest
ADD . /testheroku/
RUN chmod +x /testheroku/rasa.sh
RUN cd /testheroku && rasa train
ENTRYPOINT []
CMD /testheroku/rasa.sh
The terminal shows the following process as it builds:
[+] Building 0.8s (7/8)
=> [internal] load build definition from Dockerfile <br
=> => transferring dockerfile: 32B
=> [internal] load .dockerignore
=> => transferring context: 2B
=> [internal] load metadata for docker.io/rasa/rasa:latest
=> [internal] load build context
=> => transferring context: 721B
=> [stage-1 1/4] FROM docker.io/rasa/rasa:latest
=> CACHED [stage-1 2/4] ADD . /testheroku/
=> ERROR [stage-1 3/4] RUN chmod +x /testheroku/rasa.sh
Does anyone have any thoughts about what I need to do to make this run?
Upvotes: 0
Views: 1571
Reputation: 455
Why are you using #! /usr/bin/env bash
in your Dockerfile?
Did you try building your image without that line?
Your Dockerfile should look just like this:
FROM ubuntu
RUN apt-get update -y
RUN apt-get install -y bash
FROM rasa/rasa:latest
ADD . /testheroku/
RUN chmod +x /testheroku/rasa.sh
RUN cd /testheroku && rasa train
ENTRYPOINT []
CMD /testheroku/rasa.sh
Upvotes: 0