From 8e0600bbce2df90bfe58cc840d7185aaa4a05083 Mon Sep 17 00:00:00 2001 From: Maria Carmina Date: Wed, 4 Oct 2023 16:24:33 +0300 Subject: [PATCH 1/3] First try of optimizing Dockerfile. --- Dockerfile | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index cb075983..39ab4f84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,26 +2,25 @@ ## Copyright 2023 Ocean Protocol Foundation ## SPDX-License-Identifier: Apache-2.0 ## -FROM ubuntu:18.04 +FROM python:3.8-slim-buster LABEL maintainer="Ocean Protocol " ARG VERSION -RUN apt-get update && \ - apt-get install --no-install-recommends -y \ - gcc \ - python3.8 \ - python3-pip \ - python3.8-dev \ - gettext-base +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install --no-install-recommends -y \ + build-essential \ + gcc \ + gettext-base \ + && rm -rf /var/lib/apt/lists/* COPY . /ocean-provider WORKDIR /ocean-provider -RUN python3.8 -m pip install --upgrade pip -RUN python3.8 -m pip install setuptools -RUN python3.8 -m pip install wheel -RUN python3.8 -m pip install . +RUN python3.8 -m pip install setuptools \ + wheel \ + && python3.8 -m pip install . ENV NETWORK_URL='http://127.0.0.1:8545' From 62e12131dc7f1f380296825645f3007c0f8533e1 Mon Sep 17 00:00:00 2001 From: Maria Carmina Date: Thu, 5 Oct 2023 16:23:05 +0300 Subject: [PATCH 2/3] Progress: 437 MB --- Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39ab4f84..b852d31e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,20 +7,20 @@ LABEL maintainer="Ocean Protocol " ARG VERSION -RUN apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends -y \ - build-essential \ - gcc \ - gettext-base \ - && rm -rf /var/lib/apt/lists/* +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + build-essential \ + gcc \ + gettext-base && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* COPY . /ocean-provider WORKDIR /ocean-provider -RUN python3.8 -m pip install setuptools \ - wheel \ - && python3.8 -m pip install . +# Install dependencies in a virtual environment +RUN python3.8 -m pip install --no-cache-dir setuptools wheel && \ + python3.8 -m pip install --no-cache-dir . ENV NETWORK_URL='http://127.0.0.1:8545' From 776652cebc9f6c6fe1188ab8e0fcd21cc493d43d Mon Sep 17 00:00:00 2001 From: Maria Carmina Date: Fri, 6 Oct 2023 14:38:58 +0300 Subject: [PATCH 3/3] Fix workflow. --- .github/workflows/pytest.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index bae881b1..abdcb6e1 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -47,11 +47,16 @@ jobs: docker image rm node:16-alpine docker image rm node:18 docker image rm node:18-alpine + docker image rm node:20 + docker image rm node:20-alpine docker image rm buildpack-deps:buster docker image rm buildpack-deps:bullseye docker image rm debian:10 docker image rm debian:11 docker image rm moby/buildkit:latest + docker image rm alpine:3.16 + docker image rm alpine:3.17 + docker image rm alpine:3.18 - name: Wait for contracts deployment and C2D cluster to be ready working-directory: ${{ github.workspace }}/barge run: |