Dockerfile 2.33 KB
Newer Older
1
FROM sameersbn/gitlab-ci-multi-runner:1.1.4-7
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
2 3 4
MAINTAINER Michał "rysiek" Woźniak <rysiek@occrp.org>

#
5
# a Gitlab CI container to be used with Jekyll static site generator
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
6 7 8 9
#

# environment
ENV DEBIAN_FRONTEND=noninteractive 
10

11 12 13 14 15 16 17
# need en_US.UTF-8 locale for SASS to handle UTF-8 characters in CSS
# http://code.dblock.org/2011/06/09/compass-invalid-us-ascii-character-xe2.html
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN locale-gen en_US.UTF-8

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
# adding repository keys
ARG ADD_REPOSITORY_KEYS=
RUN if [ "$ADD_REPOSITORY_KEYS" != "" ]; then \
        DEBIAN_FRONTEND=noninteractive apt-get -q update && \
        apt-get -q -y --no-install-recommends install \
            gnupg \
            apt-transport-https \
            ca-certificates \
            lsb-release && \
        apt-get -q clean && \
        apt-get -q -y autoremove && \
        rm -rf /var/lib/apt/lists/* && \
        echo "$ADD_REPOSITORY_KEYS" | sed -e 's/^[[:space:]]*//' | apt-key add - ; \
    fi
    
# adding repositories
ARG ADD_REPOSITORIES=
RUN if [ "$ADD_REPOSITORIES" != "" ]; then \
        echo "$ADD_REPOSITORIES" | sed -e 's/^[[:space:]]*//' > /etc/apt/sources.list.d/added-from-docker-build-arg.list ; \
    fi

Michał 'rysiek' Woźniak's avatar
fixed  
Michał 'rysiek' Woźniak committed
39
# Ruby and requirements
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
40 41 42 43 44
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        ca-certificates \
        make \
        gcc \
45
        g++ \
Michał 'rysiek' Woźniak's avatar
fixed  
Michał 'rysiek' Woźniak committed
46 47 48 49
        libc-dev-bin \
        libc6-dev \
        linux-libc-dev \
        libc6 \
50
        software-properties-common \
51 52
        nodejs \
        npm && \
53
    rm -rf /var/lib/apt/lists/*
54

55 56
# npm's self-signed CA is no more
# https://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more
Michał 'rysiek' Woźniak's avatar
bugfix  
Michał 'rysiek' Woźniak committed
57
RUN npm config -g set ca ""
58

59 60 61 62 63 64 65 66
# need a newer Ruby
RUN add-apt-repository ppa:brightbox/ruby-ng && \
    apt-get update && \
    apt-get install -y --no-install-recommends \
        ruby2.4 \
        ruby2.4-dev && \
    rm -rf /var/lib/apt/lists/*
    
67 68 69 70 71 72 73 74
# we might need to install some packages, but doing this in the entrypoint doesn't make any sense
ARG INSTALL_PACKAGES=
RUN if [ "$INSTALL_PACKAGES" != "" ]; then \
        export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y \
            $INSTALL_PACKAGES \
            --no-install-recommends && \
        rm -rf /var/lib/apt/lists/* ; \
    fi
75 76
    
# Jekyll
77
RUN gem2.4 install jekyll bundle
Michał 'rysiek' Woźniak's avatar
Michał 'rysiek' Woźniak committed
78

79
VOLUME /output