debugMinor
Dockerfile parse error line 5: unknown instruction: -ESSENTIAL
Viewed 0 times
erroressentiallineunknowninstructionparsedockerfile
Problem
this is my dockerfile ;
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
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
Solution
I assume you have a copy-paste issue. The right package name is
All that leading to something along the lines of:
As a personal suggestion, when you have several commands to run, it is usually better to join them using
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-toolsAs 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-toolsCode Snippets
RUN apt-get update -yqq; apt-get -yqq install ruby ruby-dev \
build-essential redis-toolsRUN apt-get update -yqq && apt-get -yqq install ruby ruby-dev \
build-essential redis-toolsContext
StackExchange DevOps Q#6236, answer score: 3
Revisions (0)
No revisions yet.