forked from nxtlytics/ivy-homebrew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (31 loc) · 1.1 KB
/
Dockerfile
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
FROM ubuntu:jammy-20230816
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update \
&& apt -y dist-upgrade \
&& apt install -y build-essential procps curl file git adduser byacc \
&& mkdir -p ${HOME}/bash \
&& cd ${HOME}/bash \
&& curl -sLO 'http://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz' \
&& tar xvzf bash-3.2.57.tar.gz \
&& cd bash-3.2.57 \
&& ./configure --prefix=/opt/bash32 \
&& make install \
&& adduser --disabled-password --shell /opt/bash32/bin/bash linuxbrew \
&& echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers \
&& apt autoremove -yqq --purge \
&& apt clean all \
&& rm -rf \
/var/lib/apt/lists/* \
/var/log/apt/* \
/var/log/alternatives.log \
/var/log/bootstrap.log \
/var/log/dpkg.log \
/var/tmp/* \
/tmp/*
USER linuxbrew
WORKDIR /home/linuxbrew
ENV PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH \
SHELL=/opt/bash32/bin/bash \
USER=linuxbrew
RUN bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
ENTRYPOINT ["/opt/bash32/bin/bash"]