11# FROM node:18-alpine
22FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:dev-22-bookworm
33
4-
4+ ENV DEBIAN_FRONTEND=noninteractive
55
66# [Optional] Uncomment this section to install additional OS packages.
77# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
@@ -15,11 +15,32 @@ FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:dev-22-bookworm
1515
1616# RUN sudo apk add --allow-untrusted mssql-tools18_18.1.1.1-1_amd64.apk
1717
18+ # ------------------------------------------------------------
19+ # Install Bun as the current (non-root) user
20+ # ------------------------------------------------------------
1821# --- Install Bun as the current (non-root) user ---
1922RUN curl -fsSL https://bun.sh/install | bash
2023RUN "$HOME/.bun/bin/bun" --version
2124
2225# --- Make Bun globally available (so any shell/user can run `bun`) ---
26+ RUN cp "$HOME/.bun/bin/bun" /usr/local/bin/bun \
27+ && chmod 0755 /usr/local/bin/bun \
28+ && bun --version
29+
30+ # ------------------------------------------------------------
31+ # Install Deno (optimized, fewer apt-get update calls)
32+ # ------------------------------------------------------------
33+ RUN set -eux; \
34+ apt-get update; \
35+ apt-get install -y --no-install-recommends ca-certificates curl unzip; \
36+ rm -rf /var/lib/apt/lists/*; \
37+ curl -fsSL https://deno.land/x/install/install.sh | sh -s -- -y --no-modify-path; \
38+ install -m 0755 /root/.deno/bin/deno /usr/local/bin/deno; \
39+ deno --version
40+
41+ # ------------------------------------------------------------
42+ # MS SQL ODBC (your original install kept unchanged)
43+ # ------------------------------------------------------------
2344RUN sudo cp "$HOME/.bun/bin/bun" /usr/local/bin/bun
2445RUN sudo chmod 0755 /usr/local/bin/bun
2546RUN bun --version
@@ -28,35 +49,34 @@ RUN bun --version
2849RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
2950RUN curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list
3051RUN apt-get update
31- RUN sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
52+ RUN ACCEPT_EULA=Y apt-get install -y msodbcsql18
3253# RUN echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
3354# RUN ~/.bashrc
3455RUN apt-get install -y unixodbc-dev
3556
36- # alpine
57+ # ------------------------------------------------------------
58+ # Alpine variant (kept commented for reference)
59+ # ------------------------------------------------------------
3760# RUN apk update
3861# RUN apk --no-cache add curl
3962# RUN apk --no-cache add unixodbc
4063# RUN apk add sudo
4164# # - RUN apk add unzip
4265# RUN curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/msodbcsql18_18.1.1.1-1_amd64.apk
4366# RUN curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/mssql-tools18_18.1.1.1-1_amd64.apk
44- # RUN sudo apk add --allow-untrusted msodbcsql18_18.1.1.1-1_amd64.apk
45- # RUN sudo apk add --allow-untrusted mssql-tools18_18.1.1.1-1_amd64.apk
46- # RUN sudo apk add libnsl
47- # RUN sudo apk add gcompat
67+ # RUN apk add --allow-untrusted msodbcsql18_18.1.1.1-1_amd64.apk
68+ # RUN apk add --allow-untrusted mssql-tools18_18.1.1.1-1_amd64.apk
69+ # RUN apk add libnsl
70+ # RUN apk add gcompat
4871# RUN ln -s /usr/lib/libnsl.so.3 /usr/lib/libnsl.so.1
4972
50-
73+ # ------------------------------------------------------------
74+ # Example for bundling configuration scripts
75+ # ------------------------------------------------------------
5176# RUN mkdir -p /usr/config
5277# WORKDIR /usr/config
53-
54- # Bundle config source
5578# COPY . /usr/config
56-
57- # Grant permissions for to our scripts to be executable
5879# USER root
5980# RUN chmod +x /usr/config/configure-db.sh
6081# RUN chmod +x /usr/config/configure-db-local.sh
61-
6282# ENTRYPOINT ["./configure-db-local.sh"]
0 commit comments