-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ritorno a python:3-alpine con builder per minor dimensione immagine.
versione 1.2.3. Closes #5.
- Loading branch information
Showing
5 changed files
with
17 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
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,12 +1,16 @@ | ||
FROM python:3-slim | ||
|
||
FROM python:3-alpine as builder | ||
LABEL maintainer="Cristian Lucchesi <[email protected]>" | ||
|
||
RUN apt-get update && apt-get -y install cron && apt-get clean | ||
WORKDIR /client | ||
RUN apk --update add make build-base gcc musl-dev python3-dev libffi-dev openssl-dev cargo | ||
WORKDIR / | ||
COPY requirements.txt . | ||
RUN pip install wheel && mkdir /wheels && pip wheel --wheel-dir=/wheels -r requirements.txt | ||
|
||
FROM python:3-alpine | ||
WORKDIR /client | ||
ADD / . | ||
|
||
RUN pip install -r requirements.txt && mkdir data | ||
COPY --from=builder /wheels /wheels | ||
RUN pip install --no-index --find-links=/wheels -r requirements.txt | ||
RUN apk --update add bash && rm -rf /wheels && mkdir /data | ||
|
||
CMD ["bash","/client/docker_conf/init"] |
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,3 @@ | ||
{{CRON}} /usr/local/bin/python -c "import random; import time; time.sleep(random.randint(0,{{CRON_RANDOM_SLEEP}}))" && /client/executeClient.sh >/dev/null 2>&1 | ||
{{PROBLEMS_CRON}} /usr/local/bin/python -c "import random; import time; time.sleep(random.randint(0,{{CRON_RANDOM_SLEEP}}))" && /client/badStampings.sh >/dev/null 2>&1 | ||
0 0 * * * /client/cleanLogs.sh >/dev/null 2>&1 | ||
{{CRON}} python -c "import random; import time; time.sleep(random.randint(0,{{CRON_RANDOM_SLEEP}}))" && /client/executeClient.sh >/dev/null 2>&1 | ||
{{PROBLEMS_CRON}} python -c "import random; import time; time.sleep(random.randint(0,{{CRON_RANDOM_SLEEP}}))" && /client/badStampings.sh >/dev/null 2>&1 | ||
0 0 * * * /client/cleanLogs.sh >/dev/null 2>&1 |
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