-
Notifications
You must be signed in to change notification settings - Fork 46
/
Dockerfile
59 lines (47 loc) · 1.74 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
59
# Hanlon server
#
# VERSION 3.0.1
FROM ruby:2.2
MAINTAINER Joseph Callen <[email protected]>
# Enabling the unstable packages to install fuseiso
RUN echo 'deb http://httpredir.debian.org/debian unstable main non-free contrib' >> /etc/apt/sources.list \
&& echo 'Package: *' >> /etc/apt/preferences.d/pin \
&& echo 'Pin: release a=stable' >> /etc/apt/preferences.d/pin \
&& echo 'Pin-Priority: 1000' >> /etc/apt/preferences.d/pin \
&& echo '' >> /etc/apt/preferences.d/pin \
&& echo 'Package: *' >> /etc/apt/preferences.d/pin \
&& echo 'Pin: release a=stable' >> /etc/apt/preferences.d/pin \
&& echo 'Pin-Priority: 1000' >> /etc/apt/preferences.d/pin
# Install the required dependencies
RUN apt-get update -y \
&& apt-get install -y libxml2 gettext libfuse-dev libattr1-dev git build-essential libssl-dev p7zip-full fuseiso ipmitool libbz2-dev \
&& mkdir -p /usr/src/wimlib-code \
&& mkdir -p /home/hanlon \
&& git clone git://wimlib.net/wimlib /usr/src/wimlib-code \
&& cd /usr/src/wimlib-code \
&& ./bootstrap \
&& ./configure --without-ntfs-3g --prefix=/usr \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove \
gettext \
&& rm -Rf /usr/src/wimlib-code \
&& apt-get -y autoremove \
&& apt-get -y clean \
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
COPY . /home/hanlon
# We don't need gem docs
RUN echo "install: --no-rdoc --no-ri" > /etc/gemrc
RUN gem install bundle \
&& cd /home/hanlon \
&& bundle install --system
ENV LANG en_US.UTF-8
ENV WIMLIB_IMAGEX_USE_UTF8 true
ENV HANLON_WEB_PATH /home/hanlon/web
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
WORKDIR /home/hanlon
ENTRYPOINT ["/docker-entrypoint.sh"]
# Hanlon by default runs at TCP 8026
EXPOSE 8026
CMD []