@@ -3,15 +3,10 @@ FROM node:20-bullseye
33# Avoid warnings by switching to noninteractive
44ENV DEBIAN_FRONTEND=noninteractive
55
6- # Configure apt and install packages
6+ # Install necessary packages for development
77RUN apt-get update \
8- && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
9- # Install git, process tools, lsb-release
10- && apt-get -y install git procps lsb-release \
11- # Install other dependencies
12- && apt-get -y install curl wget jq sudo \
13- # Clean up
14- && apt-get autoremove -y \
8+ && apt-get -y install --no-install-recommends \
9+ git curl wget jq sudo postgresql-client \
1510 && apt-get clean -y \
1611 && rm -rf /var/lib/apt/lists/*
1712
@@ -20,10 +15,8 @@ ARG USERNAME=node
2015ARG USER_UID=1000
2116ARG USER_GID=$USER_UID
2217
23- # [Optional] Add sudo support
24- RUN apt-get update \
25- && apt-get install -y sudo \
26- && echo $USERNAME ALL=\( root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
18+ # Add sudo support
19+ RUN echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USERNAME \
2720 && chmod 0440 /etc/sudoers.d/$USERNAME
2821
2922# Make sure we have the latest npm
@@ -32,15 +25,10 @@ RUN npm install -g npm@latest
3225# Install global packages
3326RUN npm install -g drizzle-kit
3427
35- # Install dependencies for Postgres client
36- RUN apt-get update && apt-get -y install --no-install-recommends \
37- postgresql-client \
38- && rm -rf /var/lib/apt/lists/*
39-
4028# Switch back to dialog for any ad-hoc use of apt-get
4129ENV DEBIAN_FRONTEND=dialog
4230
4331WORKDIR /workspace
4432
4533# Expose the ports we're interested in
46- EXPOSE 3000
34+ EXPOSE 3000
0 commit comments