Skip to content

Commit 3eb76b7

Browse files
authored
BLD: Slimmer docker packages by cleaning up (#630)
1 parent bac221f commit 3eb76b7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pkg/docker-gramex-base/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ RUN \
5050
# Gramex Enterprise is not released every time Gramex is released. Versions may be missing.
5151
# So instead of ==$VERSION, we use <=$VERSION.
5252
pip install "gramex<=$VERSION" "gramexenterprise<=$VERSION" && \
53+
pip cache purge && \
5354
# Accept the Gramex Enterprise license
5455
gramex license accept && \
5556
# Create an /app directory where app can be mounted

pkg/docker-gramex/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ RUN \
1818
# Activate conda env to run Gramex
1919
source ~/.profile && \
2020
# Set up all Gramex apps
21-
gramex setup --all
21+
gramex setup --all && \
22+
# Clean up npm cache
23+
npm cache clean --force

task

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,13 @@ conda () {
7575
}
7676

7777
# Usage: VERSION=1.xx.0 bash task pushdocker
78-
pushdocker () {
78+
builddocker () {
7979
VERSION=$VERSION bash pkg/docker-gramex-base/setup.sh
8080
VERSION=$VERSION bash pkg/docker-gramex/setup.sh
81-
# Run security checks
82-
docker pull aquasec/trivy:latest
83-
docker run --rm aquasec/trivy:latest \
84-
-v /var/run/docker.sock:/var/run/docker.sock \
85-
-v /mnt/c/temp/trivycache:/root/.cache/
86-
--security-checks vuln \
87-
image gramener/gramex:$VERSION > reports/trivy.txt
81+
VERSION=$VERSION bash pkg/docker-gramex-test/setup.sh
82+
}
83+
84+
pushdocker () {
8885
docker login # log in as sanand0 / pratapvardhan
8986
docker push gramener/gramex-base:$VERSION
9087
docker push gramener/gramex-base:latest

0 commit comments

Comments
 (0)