Skip to content

Commit

Permalink
Base image on official dind
Browse files Browse the repository at this point in the history
  • Loading branch information
angelofenoglio committed Sep 20, 2021
1 parent c8e507f commit 59f68ea
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions leverage-cli-testing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
FROM python:3.8-slim
FROM docker:dind

LABEL vendor="Binbash Leverage ([email protected])"

RUN apt-get update &&\
apt-get install -y git curl
RUN apk update &&\
apk add --no-cache bash bash-completion ncurses git curl gcc musl-dev python3 python3-dev py3-pip

# Install bats as node package
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g bats
## Install bats from source
# RUN git clone https://github.com/bats-core/bats-core.git /opt/bats
# RUN ln -s /opt/bats/bin/bats /usr/local/bin/bats
# Install bats from source
RUN git clone https://github.com/bats-core/bats-core.git && ./bats-core/install.sh /usr/local
# Install other bats modules
RUN npm install -g --save-dev https://github.com/bats-core/bats-support
RUN npm install -g --save-dev https://github.com/bats-core/bats-assert
RUN git clone https://github.com/bats-core/bats-support.git
RUN git clone https://github.com/bats-core/bats-assert.git

# Needed as is mounted later on
RUN mkdir /root/.ssh
# Needed for git to run propertly
RUN touch /root/.gitconfig

WORKDIR /leverage
# Install requirements for running unit tests
RUN curl -LO https://raw.githubusercontent.com/binbashar/leverage/master/dev-requirements.txt
RUN pip install -r dev-requirements.txt

ENTRYPOINT [ "/bin/bash" ]
# Make script to configure and start docker daemon the default entrypoint
COPY ./leverage-cli-testing-entrypoint.sh /.
RUN chmod +x /leverage-cli-testing-entrypoint.sh
ENTRYPOINT [ "/leverage-cli-testing-entrypoint.sh" ]

0 comments on commit 59f68ea

Please sign in to comment.