forked from eclecticiq/cabby
-
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.
Merge branch 'master' into add-ca-cert-in-cli
- Loading branch information
Showing
19 changed files
with
442 additions
and
201 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,13 +1,19 @@ | ||
branches: | ||
- master | ||
|
||
language: python | ||
dist: xenial | ||
python: | ||
- "2.7" | ||
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors | ||
install: | ||
- pip install -r requirements-dev.txt | ||
- pip install coveralls | ||
# command to run tests, e.g. python setup.py test | ||
script: | ||
PYTHONPATH=.:$PYTHONPATH py.test --cov ./cabby | ||
# coverage run --source=opentaxii setup.py test | ||
- "3.5" | ||
- "3.6" | ||
- "3.7" | ||
|
||
install: | ||
- pip install coveralls -r requirements-dev.txt | ||
|
||
script: | ||
- py.test --cov cabby | ||
|
||
after_success: | ||
coveralls | ||
- coveralls |
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
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,62 +1,12 @@ | ||
# Set the base image to Python | ||
FROM alpine:3.4 | ||
MAINTAINER EclecticIQ <[email protected]> | ||
|
||
# Volume for possible input | ||
VOLUME [ "/input" ] | ||
|
||
# Create the working dir and set the working directory | ||
WORKDIR / | ||
|
||
# Setup Python | ||
RUN apk add --no-cache -U \ | ||
ca-certificates \ | ||
build-base \ | ||
libxml2 \ | ||
libxml2-dev \ | ||
libxslt \ | ||
libxslt-dev \ | ||
make \ | ||
python-dev \ | ||
py-pip \ | ||
python \ | ||
&& pip install --upgrade pip setuptools | ||
|
||
|
||
# Setup Requirements | ||
COPY ./ /cabby | ||
RUN pip install -r /cabby/requirements.txt \ | ||
&& cd /cabby \ | ||
&& python setup.py install | ||
|
||
# Cleanup | ||
RUN apk del build-base \ | ||
libxml2-dev \ | ||
libxslt-dev \ | ||
python-dev \ | ||
build-base \ | ||
&& rm -rf /var/cache/apk/* \ | ||
&& rm -r /root/.cache \ | ||
&& rm -f requirements.txt \ | ||
&& rm -rf /cabby | ||
|
||
RUN { echo '#!/bin/sh';\ | ||
echo 'echo "';\ | ||
echo ' Commands to be run:';\ | ||
echo ' taxii-discovery ';\ | ||
echo ' taxii-poll';\ | ||
echo ' taxii-collections';\ | ||
echo ' taxii-push ';\ | ||
echo ' taxii-subscription';\ | ||
echo ' taxii-proxy';\ | ||
echo '';\ | ||
echo 'e.g. docker run -ti eclecticiq/cabby taxii-discovery --path https://test.taxiistand.com/read-write/services/discovery';\ | ||
echo '';\ | ||
echo 'More information available at: http://cabby.readthedocs.org';\ | ||
echo 'Or you can choose to drop back into a shell by providing: bash as the command:';\ | ||
echo '';\ | ||
echo 'docker run -ti cabby bash"'; } > /help.sh && chmod 750 /help.sh | ||
|
||
# Give help, unless command is given | ||
CMD [ "/help.sh" ] | ||
|
||
FROM python:3-slim-stretch | ||
LABEL maintainer="EclecticIQ <[email protected]>" | ||
RUN python3 -m venv --system-site-packages /venv | ||
ENV PATH=/venv/bin:$PATH | ||
|
||
COPY ./requirements.txt ./requirements-dev.txt /cabby/ | ||
RUN pip install -r /cabby/requirements-dev.txt | ||
COPY . /cabby | ||
RUN pip install -e /cabby | ||
|
||
RUN sh -c "cat /cabby/docker-help.sh >> /root/.bashrc" | ||
CMD ["/cabby/docker-help.sh"] |
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
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
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
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
Oops, something went wrong.