-
Notifications
You must be signed in to change notification settings - Fork 85
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 #176 from idealista/features/175
#175 Using multi-stage build to create prom2teams image
- Loading branch information
Showing
5 changed files
with
17 additions
and
18 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,32 +1,29 @@ | ||
FROM python:3.5-alpine | ||
|
||
LABEL maintainer="labs@idealista.com" | ||
|
||
EXPOSE 8089 | ||
|
||
RUN apk add gcc libc-dev linux-headers --no-cache | ||
|
||
WORKDIR /opt/prom2teams | ||
|
||
COPY ./docker/ \ | ||
LICENSE \ | ||
FROM python:3.5-alpine AS builder | ||
WORKDIR /prom2teams | ||
COPY LICENSE \ | ||
MANIFEST.in \ | ||
README.md \ | ||
requirements.txt \ | ||
setup.py \ | ||
./ | ||
COPY prom2teams/ prom2teams | ||
COPY bin/ bin | ||
RUN apk add gcc libc-dev linux-headers --no-cache \ | ||
&& python setup.py bdist_wheel | ||
|
||
COPY ./bin bin | ||
COPY ./prom2teams prom2teams | ||
|
||
RUN python setup.py install | ||
|
||
FROM python:3.5-alpine | ||
LABEL maintainer="labs@idealista.com" | ||
EXPOSE 8089 | ||
WORKDIR /opt/prom2teams | ||
COPY docker/rootfs . | ||
COPY --from=builder /prom2teams/dist . | ||
RUN apk add gcc libc-dev linux-headers --no-cache \ | ||
&& pip install prom2teams*.whl | ||
ENV PROM2TEAMS_PORT="8089" \ | ||
PROM2TEAMS_HOST="0.0.0.0" \ | ||
PROM2TEAMS_LOGLEVEL="INFO" \ | ||
PROM2TEAMS_CONNECTOR="" \ | ||
PROM2TEAMS_GROUP_ALERTS_BY="" \ | ||
APP_CONFIG_FILE="/opt/prom2teams/config.ini" \ | ||
PROM2TEAMS_PROMETHEUS_METRICS="true" | ||
|
||
ENTRYPOINT ["sh", "prom2teams_start.sh"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.