-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
72 lines (56 loc) · 1.24 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
60
61
62
63
64
65
66
67
68
69
70
71
72
# syntax=docker/dockerfile:1
ARG ALPINE_VERSION
FROM alpine:$ALPINE_VERSION
ARG PG_PROVE_VERSION
ARG PGTAP_VERSION
ARG SQITCH_VERSION
ARG __DOCKERFILE_VERSION__
ARG __DOCKERFILE_DATE__
RUN <<SETUP
set -eux
apk update
apk add \
bash \
build-base \
curl \
jq \
less \
make \
nano \
openssl \
perl \
perl-app-cpanminus \
perl-dev \
postgresql-client \
postgresql-dev \
tzdata \
wget
cpanm --quiet --notest --no-man-pages \
App::Sqitch@$SQITCH_VERSION \
TAP::Parser::SourceHandler::pgTAP@$PG_PROVE_VERSION \
Template \
DBD::Pg
apk del \
build-base \
curl \
make \
perl-dev \
postgresql-dev \
wget
rm -rf /var/cache/apk/* /tmp/* /root/.cpanm
SETUP
COPY opt/pgtap /opt/pgtap/
COPY scripts/* /home/sqitch/bin/
COPY package-versions.json /home/sqitch/
RUN <<FINALIZE
set -eux
adduser --disabled-password sqitch
mkdir -p /opt /home/sqitch/bin
echo $__DOCKERFILE_VERSION__ > /home/sqitch/VERSION
echo $__DOCKERFILE_DATE__ > /home/sqitch/DATE
chmod +x /home/sqitch/bin/*
chown -R sqitch:sqitch /home/sqitch
FINALIZE
ENV LESS=-R LC_ALL=C.UTF-8 LANG=C.UTF-8 SQITCH_EDITOR=nano SQITCH_PAGER=less
USER sqitch
ENTRYPOINT []