1

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

2

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
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.