-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.noIntegrationTests
63 lines (51 loc) · 1.46 KB
/
Dockerfile.noIntegrationTests
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
# -----------------------------------------------------------------------------
# We need to have a base so that we do not install ansible, sudo etc by default.
# We want the script to handle them.
FROM ubuntu:20.04 as base
ENV DEBIAN_FRONTEND=noninteractive
# Let's install some helpful tools
RUN apt-get update -qq >/dev/null 2>&1 && \
apt-get install --yes --no-install-recommends \
apt-transport-https \
apt-utils \
ca-certificates \
cron \
curl \
dbus-x11 \
dirmngr \
less \
libnotify-bin \
iputils-ping \
net-tools \
netcat \
notify-osd \
software-properties-common \
telnet \
vim && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /user/app/workdir
# -----------------------------------------------------------------------------
FROM base as pre-test
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends sudo
RUN sudo add-apt-repository --yes ppa:deadsnakes/ppa && \
sudo apt-add-repository --yes ppa:ansible/ansible && \
apt-get update -qq >/dev/null 2>&1 && \
apt-get install -qq --yes --no-install-recommends \
ansible \
python3.8 \
python3-apt \
python3-pip
RUN pip3 install --quiet \
ansible-lint \
yamllint
COPY ansible ./
RUN ansible-lint
# -----------------------------------------------------------------------------
FROM base as build
COPY docker-entrypoint* ./
COPY ansible ./ansible/
COPY scripts ./scripts/
RUN chmod 755 docker-entrypoint*
ENTRYPOINT ["./docker-entrypoint.sh"]