Answers: <p>I assume you have a copy-paste issue. The right package name is <code>build-essential</code>. And if you want to split a RUN statement over several lines, you will have to use backslash for line continuation.</p>
  
  <p>All that leading to something along the lines of:</p>
  
  <pre><code>RUN apt-get update -yqq; apt-get -yqq install ruby ruby-dev \
            build-essential redis-tools
  </code></pre>
  
  <p>As a personal suggestion, when you have several commands to run, it is usually better to join them using <code>&amp;&amp;</code> rather than <code>;</code> since you want the build to fail if <em>either</em> command is failing.</p>
  
  <pre><code>RUN apt-get update -yqq &amp;&amp; apt-get -yqq install ruby ruby-dev \
            build-essential redis-tools
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2019-02-05T12:45:31.247Z
Answers: 2019-02-05T12:45:31.247Z
Answers: Sylvain Leroux
Body: <p>this is my dockerfile ; </p>
  
  <pre><code>FROM ubuntu:16.04
  MAINTAINER James Turnbull "james@example.com"
  ENV REFRESHED_AT 2016-06-01
  RUN apt-get update -yqq; apt-get -yqq install ruby ruby-dev build 
    -essential redis-tools
  
  RUN gem install --no-rdoc --no-ri sinatra json redis
  RUN mkdir -p /opt/webapp
  EXPOSE 4567
  
  
  CMD [ "/opt/webapp/bin/webapp" ]
  </code></pre>
  
  <p>and this is how i ran it : </p>
  
  <blockquote>
    <p>docker build -t jamtur01/sinatra .</p>
  </blockquote>
  
  <p>however i get this error in regard to  -essential </p>
  
  <blockquote>
    <p>Dockerfile parse error line 5: unknown instruction: -ESSENTIAL</p>
  </blockquote>
  
  <p>i am not clear what i have done wrong. is there an equivalent for -essential </p>
  
Tags: <dockerfile>
Title: Dockerfile parse error line 5: unknown instruction: -ESSENTIAL
UserDisplayName: theSeeker
ThreadText: # Dockerfile parse error line 5: unknown instruction: -ESSENTIAL
  
  (Asked by: username_0 on 2019-02-05)
  
  this is my dockerfile ;
  
  ```
  FROM ubuntu:16.04
  MAINTAINER James Turnbull "james@example.com"
  ENV REFRESHED_AT 2016-06-01
  RUN apt-get update -yqq; apt-get -yqq install ruby ruby-dev build 
    -essential redis-tools
  
  RUN gem install --no-rdoc --no-ri sinatra json redis
  RUN mkdir -p /opt/webapp
  EXPOSE 4567
  
  CMD [ "/opt/webapp/bin/webapp" ]
  
  ```
  
  and this is how i ran it :
  
  > docker build -t jamtur01/sinatra .
  
  however i get this error in regard to -essential
  
  > Dockerfile parse error line 5: unknown instruction: -ESSENTIAL
  
  i am not clear what i have done wrong. is there an equivalent for -essential
  
  **Tags:** dockerfile
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-02-05. Score: 3 | Accepted answer
  
  I assume you have a copy-paste issue. The right package name is `build-essential`. And if you want to split a RUN statement over several lines, you will have to use backslash for line continuation.
  
  All that leading to something along the lines of:
  
  ```
  RUN apt-get update -yqq; apt-get -yqq install ruby ruby-dev \
            build-essential redis-tools
  
  ```
  
  As a personal suggestion, when you have several commands to run, it is usually better to join them using `&&` rather than `;` since you want the build to fail if *either* command is failing.
  
  ```
  RUN apt-get update -yqq && apt-get -yqq install ruby ruby-dev \
            build-essential redis-tools
  
  ```
  
  
  ---
  
  