File: Dockerfile

package info (click to toggle)
git-quick-stats 2.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220 kB
  • sloc: sh: 1,404; makefile: 46
file content (28 lines) | stat: -rw-r--r-- 849 bytes parent folder | download
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
FROM alpine

# Copy sources
COPY . /app

# Install required packages & build git-quick-stats
RUN     apk add --no-cache bash git make ncurses coreutils util-linux \
    &&  cd /app \
    &&  make install \
    &&  rm -rf /app \
    &&  apk del --no-cache make \
    &&  mkdir -p /usr/local/bin \
    &&  echo -en "#!/bin/bash\nset -e\n[[ \"\${1::1}\" == '-' ]] && set -- /usr/bin/git quick-stats \"\$@\"\nexec \"\$@\"" \
            > /usr/local/bin/docker-entrypoint \
    &&  chmod +x /usr/local/bin/docker-entrypoint

# Declare all variables usables by git-quick-stats
ENV _GIT_SINCE= \
    _GIT_UNTIL= \
    _GIT_LIMIT= \
    _GIT_PATHSPEC= \
    _MENU_THEME=default \
    TERM=xterm-256color

WORKDIR /git
RUN git config --global --add safe.directory /git
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint" ]
CMD [ "/usr/bin/git", "quick-stats" ]