This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
9 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,9 +1,46 @@ | ||
FROM alpine:3.20.1 | ||
FROM python:3.11-slim-bullseye AS stage-build | ||
ARG TARGETARCH | ||
|
||
WORKDIR /tmp | ||
ARG DEPENDENCIES=" \ | ||
ca-certificates \ | ||
curl \ | ||
wget \ | ||
zip" | ||
|
||
COPY . . | ||
ARG APT_MIRROR=http://deb.debian.org | ||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
set -ex \ | ||
&& rm -f /etc/apt/apt.conf.d/docker-clean \ | ||
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache \ | ||
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \ | ||
&& apt-get clean all \ | ||
&& echo "no" | dpkg-reconfigure dash | ||
|
||
WORKDIR /opt/applets | ||
|
||
COPY requirements.txt ./requirements.txt | ||
|
||
ARG PIP_MIRROR=https://pypi.org/simple | ||
RUN set -ex \ | ||
&& mkdir pip_packages build \ | ||
&& pip config set global.index-url ${PIP_MIRROR} \ | ||
&& pip download \ | ||
--only-binary=:all: --platform win_amd64 \ | ||
--python-version 3.11.6 --abi cp311 \ | ||
-d pip_packages -r requirements.txt -i${PIP_MIRROR} \ | ||
&& cp requirements.txt pip_packages \ | ||
&& zip -r pip_packages.zip pip_packages \ | ||
&& mv pip_packages.zip build | ||
|
||
|
||
FROM alpine:3.20 | ||
|
||
COPY . . | ||
RUN set -ex \ | ||
&& apk add --no-cache bash \ | ||
&& bash ./prepare.sh | ||
|
||
COPY --from=stage-build /opt/applets/build /opt/applets |
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pywinauto==0.6.6 | ||
selenium==4.4.0 | ||
pywin32==304 | ||
PyYAML==6.0 | ||
cffi==1.16.0 |
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