-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (31 loc) · 923 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (31 loc) · 923 Bytes
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
FROM ubuntu:24.04
ARG TARGETPLATFORM
ARG TARGETARCH
# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Update and install core packages
RUN --mount=type=cache,target=/var/lib/apt,id=$TARGETPLATFORM/var/lib/apt \
--mount=type=cache,target=/var/cache/apt,id=$TARGETPLATFORM/var/cache/apt \
apt-get update && apt-get install -y \
ca-certificates \
curl \
git \
gnupg \
libpq-dev \
postgresql \
postgresql-contrib \
python3 \
python3-pip \
sudo \
tree \
wget \
unzip
# Install Bazelisk
RUN curl -Lo /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-$TARGETARCH \
&& chmod +x /usr/local/bin/bazelisk \
&& ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel
# Create dev user
ARG USERNAME=ubuntu
RUN echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER $USERNAME
CMD ["/bin/bash"]