forked from ePages-de/epages-docs
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.ruby
More file actions
53 lines (40 loc) · 1.18 KB
/
Copy pathDockerfile.ruby
File metadata and controls
53 lines (40 loc) · 1.18 KB
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
# Use official Ruby image
FROM ruby:2.4.1
####################
# Configure basics #
####################
# Configure timezone server
ENV TZ="Europe/Berlin"
RUN echo "${TZ}" | tee /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata
# Install missing packages
RUN echo "deb http://ftp.de.debian.org/debian jessie main" >> /etc/apt/sources.list && \
apt-get update && apt-get install --yes \
locales
# Set server locale
ENV LANG="en_US.UTF-8" \
LANGUAGE="en_US.UTF-8"
RUN locale-gen en_US.UTF-8 && \
localedef en_US.UTF-8 -i en_US -fUTF-8
#################################
# Setup epages-docs environment #
#################################
ENV EPAGES_DOCS="/usr/src/epages-docs"
# Create the workdir for epages-docs
RUN mkdir -p ${EPAGES_DOCS}
WORKDIR ${EPAGES_DOCS}
# Install gems
COPY Gemfile Gemfile.lock ${EPAGES_DOCS}/
RUN bundle install
# Copy repo to enable running without the mounted volume.
COPY . ${EPAGES_DOCS}
# Set mountpoint
VOLUME ${EPAGES_DOCS}
# Open port
EXPOSE 4000
# Copy our entrypoint script
COPY _docker/ruby/docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
# Set default command
CMD ["rake"]