Skip to content

Commit 497cdf8

Browse files
Adding bun to the pulumi/pulumi image (#509)
Allowing it to be used as a package manager --------- Co-authored-by: Julien Poissonnier <julien@caffeine.lu>
1 parent 4e47e5e commit 497cdf8

5 files changed

Lines changed: 22 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## Unreleased
44

5+
- Add Bun to allow using it as a package manager for Node.js programs
6+
([509](https://github.com/pulumi/pulumi-docker-containers/pull/509))
7+
8+
- Add pnpm to Node.js images
9+
([509](https://github.com/pulumi/pulumi-docker-containers/pull/509))
10+
511
- Fix pushing all image variants of pulumi/pulumi to ECR and GHCR
612
([#492](https://github.com/pulumi/pulumi-docker-containers/pull/492))
713

docker/nodejs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN apt-get update -y && \
2727
curl \
2828
git \
2929
ca-certificates && \
30-
npm install -g npm@10.5.1
30+
npm install -g npm@10.5.1 bun pnpm
3131

3232
# Uses the workdir, copies from pulumi interim container
3333
COPY --from=builder /root/.pulumi/bin/pulumi /pulumi/bin/pulumi

docker/nodejs/Dockerfile.ubi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ ENV FNM_DIR=/usr/local/share/fnm
2828
RUN fnm install ${LANGUAGE_VERSION} && \
2929
fnm alias ${LANGUAGE_VERSION} default
3030
ENV PATH=/usr/local/share/fnm/aliases/default/bin:$PATH
31-
RUN npm install -g corepack && \
32-
corepack install -g yarn@1
31+
RUN npm install -g corepack bun && \
32+
corepack install -g yarn@1 pnpm
3333

3434
# Uses the workdir, copies from pulumi interim container
3535
COPY --from=builder /root/.pulumi/bin/pulumi /pulumi/bin/pulumi

docker/pulumi/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ RUN fnm install 20 && \
161161
fnm install 24 && \
162162
fnm alias 24 default
163163
ENV PATH=/usr/local/share/fnm/aliases/default/bin:$PATH
164-
RUN npm install -g corepack && \
164+
RUN npm install -g corepack bun && \
165165
corepack install -g pnpm yarn@1
166166

167167
# Passing --build-arg PULUMI_VERSION=vX.Y.Z will use that version

tests/containers_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ func TestEnvironment(t *testing.T) {
341341
expectedUbi: "/usr/local/share/fnm/aliases/default/bin/npm",
342342
expectedKitchen: "/usr/local/share/fnm/aliases/default/bin/npm",
343343
},
344-
345344
{
346345
name: "yarn",
347346
expectedDebian: "/usr/local/bin/yarn",
@@ -354,6 +353,18 @@ func TestEnvironment(t *testing.T) {
354353
expectedUbi: "/usr/local/share/fnm/aliases/default/bin/corepack",
355354
expectedKitchen: "/usr/local/share/fnm/aliases/default/bin/corepack",
356355
},
356+
{
357+
name: "bun",
358+
expectedDebian: "/usr/local/bin/bun",
359+
expectedUbi: "/usr/local/share/fnm/aliases/default/bin/bun",
360+
expectedKitchen: "/usr/local/share/fnm/aliases/default/bin/bun",
361+
},
362+
{
363+
name: "pnpm",
364+
expectedDebian: "/usr/local/bin/pnpm",
365+
expectedUbi: "/usr/local/share/fnm/aliases/default/bin/pnpm",
366+
expectedKitchen: "/usr/local/share/fnm/aliases/default/bin/pnpm",
367+
},
357368
} {
358369
testCase := testCase
359370
t.Run(testCase.name, func(t *testing.T) {

0 commit comments

Comments
 (0)