-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxonsh-glibc-binary.Dockerfile
More file actions
39 lines (32 loc) · 1.68 KB
/
xonsh-glibc-binary.Dockerfile
File metadata and controls
39 lines (32 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# set `debian:sid` here to get more fresh python (see also https://hub.docker.com/_/debian)
FROM ubuntu:20.04
ARG PYTHON_VER=3.11.14
ARG XONSH_VER=0.22.0
ENV PYTHON_VER=${PYTHON_VER}
ENV XONSH_VER=${XONSH_VER}
SHELL ["/bin/bash", "-c"]
RUN apt update && apt install -y curl git vim patchelf elfutils binutils-common binutils
RUN yes | bash -c "$(curl -L https://micro.mamba.pm/install.sh)"
RUN /root/.local/bin/micromamba shell init -s bash >> ~/.bashrc
WORKDIR /
RUN git clone -b $XONSH_VER https://github.com/xonsh/xonsh
RUN mkdir -p /result
RUN eval "$(/root/.local/bin/micromamba shell hook -s bash)" \
&& micromamba activate base \
&& micromamba install -y -c conda-forge libpython-static==$PYTHON_VER gcc ccache \
&& pip install -U pip setuptools wheel certifi \
&& pip install xonsh[full] ujson pygments prompt_toolkit pyperclip \
&& xonsh -c '2+2' \
&& pip install git+https://github.com/Nuitka/Nuitka@factory \
&& nuitka --standalone --onefile --static-libpython=yes --no-deployment-flag=self-execution \
--onefile-tempdir-spec='%TEMP%/onefile_%PID%_%TIME%' \
--show-progress --show-scons --show-modules \
--assume-yes-for-downloads --jobs=2 \
--include-package=pip --include-package=setuptools --include-package=wheel \
--include-package=certifi --include-package-data=certifi \
--include-module=ujson \
--include-package=pygments --include-package=prompt_toolkit --include-module=pyperclip \
/root/micromamba/lib/python3.11/site-packages/xonsh
# --python-flag=nosite,-O,-v
RUN mv xonsh.bin xonsh-$XONSH_VER-py$PYTHON_VER-glibc-$(uname -m).bin
CMD cp xonsh-*.bin /result