-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (42 loc) · 1.55 KB
/
Copy pathDockerfile
File metadata and controls
49 lines (42 loc) · 1.55 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
40
41
42
43
44
45
46
47
48
49
#
# Jugal Kishore -- 2020
#
# All the required tools for Python coding and stuff
FROM ubuntu:resolute
# Non-interactive build
ARG DEBIAN_FRONTEND=noninteractive
# Terminal type
ENV TERM=xterm-256color
# Update, upgrade, install, autoremove, clean in one layer
RUN apt-get update && \
apt-get --yes upgrade && \
apt-get install --yes --no-install-recommends \
git curl python3 python3-pip wget nano \
tar zip unzip locales-all \
python-is-python3 gpg openssh-client xz-utils \
iputils-ping traceroute tmux screen \
gpg jq python3-venv tree 1> /dev/null && \
apt-get --yes autoremove --purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*
# Install pip packages
RUN pip install --no-cache-dir --break-system-packages \
flake8 \
pyflakes \
black \
csvtomd \
requests
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=/usr/local/bin sh
# Install sendme
RUN ARCH="$(uname -m)" && \
case "$ARCH" in \
x86_64) TARGET="linux-x86_64" ;; \
aarch64) TARGET="linux-aarch64" ;; \
*) echo "Unsupported: $ARCH" && exit 1 ;; \
esac && \
URL="$(curl -fsSL --retry 3 https://api.github.com/repos/n0-computer/sendme/releases/latest | jq -er --arg t "$TARGET" '[.assets[] | select(.name | contains($t)) | select(.name | endswith(".tar.gz")) | .browser_download_url] | .[0]')" && \
curl -fsSL --retry 3 -o /tmp/sendme.tar.gz "$URL" && \
tar -xzf /tmp/sendme.tar.gz -C /usr/local/bin && \
rm -f /tmp/sendme.tar.gz
CMD ["bash"]