-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·58 lines (43 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Build on top of latest ruby-slim container
FROM ruby:slim
MAINTAINER Team Charlie <[email protected]>
# Set up proxy settings
ARG http_proxy
ARG https_proxy
ENV http_proxy=$http_proxy
ENV https_proxy=$https_proxy
# Set up proxy for the debian package manager
RUN echo 'Acquire::http::Proxy "'$http_proxy'";' > /etc/apt/apt.conf
#######################
# Install dependencies
#######################
ENV LANG C.UTF-8
RUN apt-get update -qy
RUN apt-get upgrade -y
RUN apt-get update -qy
RUN apt-get install -y build-essential
# for postgres
RUN apt-get install -y libpq-dev
# for a JS runtime
RUN apt-get install -y nodejs
# For ffi-1.9.18 gem
RUN apt-get install -y curl
# For image conversion
RUN apt-get install -y imagemagick
# Create old uploads stub in the container
RUN mkdir -p /old-uploads
# Create the server direcotory in the container
RUN mkdir -p /lacr-search
WORKDIR /lacr-search
# Add source files in the container
ADD src/Gemfile /lacr-search/Gemfile
ADD src/Gemfile.lock /lacr-search/Gemfile.lock
# Install required gems
RUN bundle update --bundler
RUN bundle install
# Disable the proxy settings.
# Otherwise ruby will try to connect to the other containers
# via this proxy.
RUN echo '' > /etc/apt/apt.conf
ENV http_proxy=''
ENV https_proxy=''