-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile-ubuntu
47 lines (38 loc) · 1.34 KB
/
Dockerfile-ubuntu
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
FROM ubuntu:24.04
# ENV container docker
ENV UBUNTU_USERNAME=mikee
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
python3-pip \
# pipx \
python3-venv \
sudo \
&& apt-get clean all
### Workaround for old pipx package in Ubuntu 24.04 repos: https://github.com/pypa/pipx/issues/1481
# RUN pipx ensurepath \
# && pipx install pipx \
# && apt remove -y pipx
# RUN ~/.local/bin/pipx install pipx --global \
# && pipx uninstall pipx
# RUN pipx ensurepath \
# && pipx ensurepath --global
RUN pip3 install --break-system-packages --no-cache-dir pipx
###
# https://pypi.org/project/pip/
# rm -rfv /usr/lib/*/EXTERNALLY-MANAGED
# RUN pip3 install --break-system-packages --no-cache-dir --upgrade pip==24.3.1 && \
# https://pypi.org/project/pip/
# pipx install --global --include-deps --force --preinstall ansible-lint --preinstall pywinrm ansible
RUN pipx install --global --force --include-deps \
# https://pypi.org/project/ansible-lint/
ansible-lint
RUN pipx install --global --force --include-deps \
# https://pypi.org/project/ansible/
ansible
RUN pipx install --global --force --include-deps \
# https://pypi.org/project/yamllint/
yamllint
RUN useradd ${UBUNTU_USERNAME} && usermod -aG sudo ${UBUNTU_USERNAME}
CMD ["/usr/bin/sleep", "infinity"]