-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from marko-k0/develop
Dockerfile & Backoff Spamming Fix
- Loading branch information
Showing
5 changed files
with
54 additions
and
4 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,3 +1,7 @@ | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
language: python | ||
python: | ||
- "3.7" | ||
|
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM alpine as build | ||
|
||
RUN apk add --no-cache python3 python3-dev build-base libffi-dev openssl-dev linux-headers git && \ | ||
python3 -m ensurepip && \ | ||
rm -r /usr/lib/python*/ensurepip && \ | ||
pip3 install --upgrade pip setuptools wheel && \ | ||
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \ | ||
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \ | ||
rm -r /root/.cache | ||
|
||
COPY . /sonny | ||
WORKDIR /sonny | ||
|
||
RUN pip install -e . && python setup.py bdist_wheel | ||
|
||
|
||
|
||
FROM alpine | ||
|
||
COPY --from=build /sonny/dist/*.whl . | ||
RUN apk add --no-cache python3 python3-dev build-base libffi-dev openssl-dev linux-headers git nmap && \ | ||
python3 -m ensurepip && \ | ||
rm -r /usr/lib/python*/ensurepip && \ | ||
pip3 install --upgrade pip setuptools wheel && \ | ||
pip3 install --upgrade *.whl && \ | ||
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \ | ||
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \ | ||
rm -r /root/.cache && rm *.whl | ||
|
||
WORKDIR /root | ||
CMD ["true"] |
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