| 
									
										
										
										
											2020-05-20 12:00:34 -07:00
										 |  |  | ARG version=20.04
 | 
					
						
							| 
									
										
										
										
											2021-09-14 21:23:39 +08:00
										 |  |  | # shellcheck disable=SC2154
 | 
					
						
							|  |  |  | FROM ubuntu:"${version}"
 | 
					
						
							| 
									
										
										
										
											2020-04-27 22:37:35 -07:00
										 |  |  | ARG DEBIAN_FRONTEND=noninteractive | 
					
						
							| 
									
										
										
										
											2018-10-23 21:37:15 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-25 14:16:34 +01:00
										 |  |  | # hadolint ignore=DL3008
 | 
					
						
							| 
									
										
										
										
											2018-10-23 21:37:15 -07:00
										 |  |  | RUN apt-get update \
 | 
					
						
							| 
									
										
										
										
											2020-05-03 14:29:09 +01:00
										 |  |  |   && apt-get install -y --no-install-recommends software-properties-common \
 | 
					
						
							|  |  |  |   && add-apt-repository -y ppa:git-core/ppa \
 | 
					
						
							|  |  |  |   && apt-get update \
 | 
					
						
							| 
									
										
										
										
											2020-04-26 09:55:14 +01:00
										 |  |  |   && apt-get install -y --no-install-recommends \
 | 
					
						
							|  |  |  |     bzip2 \
 | 
					
						
							|  |  |  |     ca-certificates \
 | 
					
						
							|  |  |  |     curl \
 | 
					
						
							|  |  |  |     file \
 | 
					
						
							|  |  |  |     fonts-dejavu-core \
 | 
					
						
							|  |  |  |     g++ \
 | 
					
						
							| 
									
										
										
										
											2021-02-27 22:56:48 +01:00
										 |  |  |     gawk \
 | 
					
						
							| 
									
										
										
										
											2020-04-26 09:55:14 +01:00
										 |  |  |     git \
 | 
					
						
							| 
									
										
										
										
											2020-04-27 22:37:35 -07:00
										 |  |  |     less \
 | 
					
						
							| 
									
										
										
										
											2020-04-26 09:55:14 +01:00
										 |  |  |     libz-dev \
 | 
					
						
							|  |  |  |     locales \
 | 
					
						
							|  |  |  |     make \
 | 
					
						
							|  |  |  |     netbase \
 | 
					
						
							|  |  |  |     openssh-client \
 | 
					
						
							|  |  |  |     patch \
 | 
					
						
							|  |  |  |     sudo \
 | 
					
						
							|  |  |  |     uuid-runtime \
 | 
					
						
							|  |  |  |     tzdata \
 | 
					
						
							| 
									
										
										
										
											2020-04-27 22:37:35 -07:00
										 |  |  |   && rm -rf /var/lib/apt/lists/* \
 | 
					
						
							|  |  |  |   && localedef -i en_US -f UTF-8 en_US.UTF-8 \
 | 
					
						
							| 
									
										
										
										
											2020-04-26 09:55:14 +01:00
										 |  |  |   && useradd -m -s /bin/bash linuxbrew \
 | 
					
						
							| 
									
										
										
										
											2021-08-03 17:56:21 -06:00
										 |  |  |   && echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers \
 | 
					
						
							|  |  |  |   && su - linuxbrew -c 'mkdir ~/.linuxbrew'
 | 
					
						
							| 
									
										
										
										
											2020-04-27 22:37:35 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-03 17:56:21 -06:00
										 |  |  | USER linuxbrew
 | 
					
						
							|  |  |  | COPY --chown=linuxbrew:linuxbrew . /home/linuxbrew/.linuxbrew/Homebrew
 | 
					
						
							| 
									
										
										
										
											2021-09-13 20:32:20 +08:00
										 |  |  | ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}"
 | 
					
						
							| 
									
										
										
										
											2020-04-27 22:37:35 -07:00
										 |  |  | WORKDIR /home/linuxbrew
 | 
					
						
							| 
									
										
										
										
											2020-04-25 14:16:34 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-18 16:55:05 +02:00
										 |  |  | RUN mkdir -p \
 | 
					
						
							|  |  |  |      .linuxbrew/bin \
 | 
					
						
							|  |  |  |      .linuxbrew/etc \
 | 
					
						
							|  |  |  |      .linuxbrew/include \
 | 
					
						
							|  |  |  |      .linuxbrew/lib \
 | 
					
						
							|  |  |  |      .linuxbrew/opt \
 | 
					
						
							|  |  |  |      .linuxbrew/sbin \
 | 
					
						
							|  |  |  |      .linuxbrew/share \
 | 
					
						
							|  |  |  |      .linuxbrew/var/homebrew/linked \
 | 
					
						
							|  |  |  |      .linuxbrew/Cellar \
 | 
					
						
							|  |  |  |   && ln -s ../Homebrew/bin/brew .linuxbrew/bin/brew \
 | 
					
						
							|  |  |  |   && git -C .linuxbrew/Homebrew remote set-url origin https://github.com/Homebrew/brew \
 | 
					
						
							|  |  |  |   && git -C .linuxbrew/Homebrew fetch origin \
 | 
					
						
							| 
									
										
										
										
											2020-04-27 22:37:35 -07:00
										 |  |  |   && HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/core \
 | 
					
						
							| 
									
										
										
										
											2020-04-26 09:55:14 +01:00
										 |  |  |   && brew install-bundler-gems \
 | 
					
						
							| 
									
										
										
										
											2020-04-27 22:37:35 -07:00
										 |  |  |   && brew cleanup \
 | 
					
						
							| 
									
										
										
										
											2021-08-18 16:55:05 +02:00
										 |  |  |   && { git -C .linuxbrew/Homebrew config --unset gc.auto; true; } \
 | 
					
						
							|  |  |  |   && { git -C .linuxbrew/Homebrew config --unset homebrew.devcmdrun; true; } \
 | 
					
						
							|  |  |  |   && rm -rf .cache
 |