-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
50 lines (40 loc) · 1.37 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
FROM debian:wheezy
MAINTAINER Tobias Munk <[email protected]>
# based upon https://github.com/fooforge/docker-gollum
ENV DEBIAN_FRONTEND noninteractive
# this forces dpkg not to call sync() after package extraction and speeds up install
RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
# we don't need and apt cache in a container
RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
# Install dependencies
RUN apt-get update && \
apt-get upgrade -y
RUN apt-get install -y -q \
build-essential \
make \
cron \
git-core \
libicu-dev \
zlib1g-dev \
ruby1.9.3 && \
apt-get clean && \
rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
# Install gollum
RUN gem install --no-ri --no-rdoc \
gollum \
github-markdown \
rack-cache
# Patching grit, see https://github.com/gollum/gollum/issues/843
RUN sed -i \
's/\[tmode, obj.name, sha\]/\[tmode, obj.name.force_encoding("ASCII-8BIT"), sha\]/g' \
/var/lib/gems/1.9.1/gems/gitlab-grit-2.7.2/lib/grit/index.rb
# Initialize support files
ADD root/crontab /root/crontab
ADD root/update.sh /root/update.sh
ADD root/run.sh /root/run.sh
RUN /bin/chmod 0700 /root/run.sh /root/update.sh
RUN mkdir /wiki/ /root/.ssh
# Start gollum app with rackup
EXPOSE 9292
WORKDIR /wiki
CMD ["/root/run.sh"]