diff --git a/CHANGELOG.md b/CHANGELOG.md index 86f49889..042248c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Docker image vulnerabilities in Authentication Building Block. [#499](https://github.com/rokwire/rokwire-building-blocks-api/issues/499) +- Docker image vulnerabilities in Events Building Block. [#484](https://github.com/rokwire/rokwire-building-blocks-api/issues/484) ## [1.6.0] - 2020-07-14 - Add Health Building Block APIs documentation. [#468](https://github.com/rokwire/rokwire-building-blocks-api/issues/468) diff --git a/eventservice/Dockerfile b/eventservice/Dockerfile index 82a6e9b9..584a9f03 100644 --- a/eventservice/Dockerfile +++ b/eventservice/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3 +FROM python:3-alpine3.11 LABEL maintainer="bing@illinois.edu" @@ -8,7 +8,14 @@ WORKDIR /app COPY eventservice/events.yaml /app/ COPY eventservice /app/eventservice/ COPY lib /lib/ -RUN pip install -r /app/eventservice/requirements.txt + + +RUN apk --update add python3 py3-pip openssl ca-certificates py3-openssl && \ + apk --update add --virtual build-dependencies libffi-dev openssl-dev python3-dev py3-pip build-base && \ + pip install --upgrade pip && \ + pip install -r /app/eventservice/requirements.txt --no-cache-dir && \ + apk del build-dependencies + VOLUME /var/cache/app WORKDIR /app/eventservice/api