-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
40 lines (30 loc) · 811 Bytes
/
Dockerfile.dev
File metadata and controls
40 lines (30 loc) · 811 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
38
39
40
FROM ubuntu:24.04
ARG USER=dev
ARG UID=1000
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
sudo \
curl \
git \
wget \
unzip \
zip \
libssl-dev \
libffi-dev \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
# Delete the default user if it exists
RUN deluser --remove-home ubuntu || true
# Create a non-root user
RUN useradd -m -s /bin/bash -u $UID $USER && \
echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER $USER
WORKDIR /home/$USER
ENV GRADLE_USER_HOME=/home/$USER/.gradle
# Install SDKMAN
RUN curl -s "https://get.sdkman.io" | bash && \
bash -c "source /home/$USER/.sdkman/bin/sdkman-init.sh && sdk install java 25-amzn && sdk install gradle"
EXPOSE 8080
CMD [ "sleep", "infinity" ]