From 2aef26f42c405d3032f0f5ccc80390290df0cfe4 Mon Sep 17 00:00:00 2001 From: kirykr Date: Wed, 29 Jun 2022 21:30:30 +0700 Subject: [PATCH] Updated docker file --- Dockerfile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7a902cd46c..c6e4a0a607 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,10 +11,19 @@ RUN npm -v #Install phantomjs in the app container RUN apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 -y -RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -RUN tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/ -RUN ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/ -RUN rm phantomjs-2.1.1-linux-x86_64.tar.bz2 +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + curl \ + && mkdir /tmp/phantomjs \ + && curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 \ + | tar -xj --strip-components=1 -C /tmp/phantomjs \ + && cd /tmp/phantomjs \ + && mv bin/phantomjs /usr/local/bin/ \ + && cd \ + && apt-get purge --auto-remove -y \ + curl \ + && apt-get clean \ + && rm -rf /tmp/* /var/lib/apt/lists/* RUN phantomjs --version @@ -42,4 +51,4 @@ ENTRYPOINT ["entrypoint.sh"] EXPOSE 3000 # Start the main process. -CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"] \ No newline at end of file +CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]