-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8e507f
commit 59f68ea
Showing
1 changed file
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |