Skip to content

Commit

Permalink
switch to using Debian as a base instead of playwright's image
Browse files Browse the repository at this point in the history
  • Loading branch information
snshn committed May 21, 2024
1 parent d84439d commit d917fcb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 29 deletions.
35 changes: 7 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,16 @@
FROM mcr.microsoft.com/playwright:v1.44.0-jammy
FROM python:3.11-bookworm

RUN apt-get update && apt-get install -y \
build-essential \
zlib1g-dev \
libncurses5-dev \
libgdbm-dev \
libnss3-dev \
libsqlite3-dev \
libssl-dev \
libreadline-dev \
libffi-dev wget

## Build python
WORKDIR /src/python
RUN wget https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tgz && \
tar -xf Python-3.12.3.tgz && \
rm Python-3.12.3.tgz && \
cd Python-3.12.3 && \
./configure --enable-optimizations && \
make install && \
cd .. && \
rm -rf Python-3.12.3
default-libmysqlclient-dev \
gcc \
pkg-config \
build-essential \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /src/reworkd/harambe

RUN chown pwuser:pwuser .

USER pwuser

ENV PATH="/home/pwuser/.local/bin:${PATH}"

# Installing requirements
ADD Prebuild.mk pyproject.toml poetry.lock ./

RUN make -f Prebuild.mk RESOLVE_DEPS

CMD ["make", "TEST"]
7 changes: 6 additions & 1 deletion Prebuild.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/make -f


RESOLVE_DEPS: ## Install required dependencies
@pip3 install poetry
@pip install poetry==1.6.1
@poetry config virtualenvs.create false
@poetry install --no-root
ifneq ($(CI),true)
@playwright install-deps chromium && playwright install chromium
endif
.PHONY: RESOLVE_DEPS

0 comments on commit d917fcb

Please sign in to comment.