28 lines
834 B
Docker
28 lines
834 B
Docker
FROM hashicorp/terraform:1.14.7 AS terraform
|
|
|
|
FROM amazon/aws-cli:2.34.32
|
|
|
|
# Copy terraform binary from official Terraform image
|
|
COPY --from=terraform /bin/terraform /usr/local/bin/terraform
|
|
|
|
RUN yum install -y git jq
|
|
|
|
WORKDIR /app
|
|
|
|
# Install bats and helpers
|
|
RUN git clone --depth 1 https://github.com/bats-core/bats-core.git /opt/bats-core \
|
|
&& git clone --depth 1 https://github.com/bats-core/bats-support.git /opt/bats-support \
|
|
&& git clone --depth 1 https://github.com/bats-core/bats-assert.git /opt/bats-assert
|
|
|
|
COPY . .
|
|
|
|
ENV FLOCI_ENDPOINT=http://floci:4566
|
|
ENV AWS_ENDPOINT_URL=http://floci:4566
|
|
ENV AWS_ACCESS_KEY_ID=test
|
|
ENV AWS_SECRET_ACCESS_KEY=test
|
|
ENV AWS_DEFAULT_REGION=us-east-1
|
|
ENV BATS_LIB_PATH=/opt
|
|
|
|
RUN chmod +x /app/run-bats-in-container.sh && mkdir -p /results
|
|
ENTRYPOINT ["./run-bats-in-container.sh"]
|