forked from roots/trellis-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
37 lines (28 loc) · 1.34 KB
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
# This docker image is for integration testing only.
FROM golang:1.13-buster
ARG DEBIAN_FRONTEND=noninteractive
ENV TEST_BINARY=/test/trellis-cli
ENV TEST_DUMMY=/test/dummy
WORKDIR /app
# CircleCI
# https://circleci.com/docs/2.0/custom-images/
RUN apt-get -q update && \
apt-get install -q -y --no-install-recommends git openssh-client openssh-server tar gzip && \
apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Ansible
# https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#latest-releases-via-apt-debian
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 && \
echo "deb http://ppa.launchpad.net/ansible/ansible-2.7/ubuntu trusty main" | tee -a /etc/apt/sources.list && \
apt-get -q update && \
apt-get install -q -y --no-install-recommends ansible && \
apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Trellis
RUN git clone https://github.com/roots/trellis.git "${TEST_DUMMY}/trellis" && \
cd "${TEST_DUMMY}/trellis" && \
ansible-galaxy install -r galaxy.yml
# Bedrock
RUN mkdir -p "${TEST_DUMMY}/site" && \
touch "${TEST_DUMMY}/site/.keep"
RUN go version && \
ansible --version && \
echo "Trellis commit: " && cd "${TEST_DUMMY}/trellis" && git log -1 --format="%h %s %aD"