Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Dockerfile. #668

Merged
merged 3 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
21 changes: 10 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"

ARG VERSION

RUN apt-get update && \
apt-get install --no-install-recommends -y \
gcc \
python3.8 \
python3-pip \
python3.8-dev \
gettext-base
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 --upgrade pip
RUN python3.8 -m pip install setuptools
RUN python3.8 -m pip install wheel
RUN 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'

Expand Down