forked from cloudposse/build-harness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.slim
53 lines (40 loc) · 1.41 KB
/
Dockerfile.slim
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
FROM alpine:3.13
LABEL maintainer="Cloud Posse <[email protected]>"
LABEL "com.github.actions.name"="Build Harness"
LABEL "com.github.actions.description"="Run any build-harness make target"
LABEL "com.github.actions.icon"="tool"
LABEL "com.github.actions.color"="blue"
RUN apk --no-cache add \
bash \
ca-certificates \
coreutils \
curl \
git \
gettext \
grep \
jq \
libc6-compat \
make
RUN git config --global advice.detachedHead false
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -fsSL --retry 3 https://apk.cloudposse.com/install.sh | bash
## Install as packages
RUN apk --no-cache add \
gomplate@cloudposse \
terraform-0.12@cloudposse terraform-0.13@cloudposse terraform-0.14@cloudposse \
terraform-config-inspect@cloudposse \
terraform-docs@cloudposse \
vert@cloudposse
RUN sed -i /PATH=/d /etc/profile
# Use Terraform 0.13 by default
ARG DEFAULT_TERRAFORM_VERSION=0.13
RUN update-alternatives --set terraform /usr/share/terraform/$DEFAULT_TERRAFORM_VERSION/bin/terraform && \
mkdir -p /build-harness/vendor && \
ln -s /usr/share/terraform/$DEFAULT_TERRAFORM_VERSION/bin/terraform /build-harness/vendor/terraform
COPY ./ /build-harness/
ENV INSTALL_PATH /usr/local/bin
WORKDIR /build-harness
ENV PACKAGES_PREFER_HOST=true
RUN make -s bash/lint make/lint
RUN make -s template/deps readme/deps
ENTRYPOINT ["/usr/bin/make"]