-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to using Debian as a base instead of playwright's image
- Loading branch information
Showing
2 changed files
with
13 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |