-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (40 loc) · 1.12 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
37
38
39
40
# Use an official Ubuntu as a parent image
FROM ubuntu:latest
# Update packages and install necessary tools
RUN apt-get update && \
apt-get install -y \
curl \
unzip \
git \
software-properties-common
# Install Homebrew
RUN mkdir -p /home/linuxbrew/.linuxbrew && \
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /home/linuxbrew/.linuxbrew
ENV PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
# Install dependencies for Homebrew
RUN apt-get install -y build-essential
# Cleanup
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create a non-root user to run Homebrew
RUN useradd -m -s /bin/bash linuxbrew && \
chown -R linuxbrew:linuxbrew /home/linuxbrew
# Switch to the linuxbrew user
USER linuxbrew
# Install tooling using Homebrew
RUN brew install terraform
RUN brew install azure-cli
RUN brew install tflint
RUN brew install tfsec
RUN brew tap databricks/tap
RUN brew install databricks
RUN brew install terraform-docs
# Verify installations
RUN terraform --version
RUN tflint --version
# Switch back to root
USER root
# Set working dir
WORKDIR /work
# Default command
CMD ["bash"]