Skip to content

Commit f6fa64a

Browse files
committed
plugincontainer/ci: fix docker build
Install adduser, specify ubuntu image version
1 parent 90fcdf1 commit f6fa64a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Copyright (c) HashiCorp, Inc.
22
# SPDX-License-Identifier: MPL-2.0
33

4-
FROM gcr.io/distroless/static-debian12 as root
4+
FROM gcr.io/distroless/static-debian12 AS root
55

66
COPY go-plugin-counter /bin/go-plugin-counter
77

88
ENTRYPOINT [ "/bin/go-plugin-counter" ]
99

10-
FROM docker.mirror.hashicorp.services/ubuntu as nonroot
10+
FROM docker.mirror.hashicorp.services/ubuntu:24.04 AS nonroot
1111

1212
COPY go-plugin-counter /bin/go-plugin-counter
1313

14-
RUN apt-get update && apt-get install -y libcap2-bin acl && \
14+
RUN apt-get update && apt-get install -y libcap2-bin acl adduser && \
1515
addgroup --system nonroot && \
1616
adduser --system --ingroup nonroot nonroot && \
1717
chown -R nonroot:nonroot /bin/go-plugin-counter && \
@@ -22,9 +22,9 @@ USER nonroot
2222

2323
ENTRYPOINT [ "/bin/go-plugin-counter" ]
2424

25-
FROM nonroot as nonroot-mlock
25+
FROM nonroot AS nonroot-mlock
2626

2727
ENTRYPOINT [ "/bin/go-plugin-counter-mlock" ]
2828

2929
# Set root as the default image.
30-
FROM root
30+
FROM root

plugincontainer/examples/container/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To run the example:
1111

1212
```sh
1313
# Build the plugin container image
14-
$ go build -o go-plugin-counter ./plugin-counter && docker build -t go-plugin-counter .
14+
$ go build -o go-plugin-counter ./plugin-counter && docker build -t plugin-counter .
1515

1616
# Read and write
1717
$ go run main.go increment hello 1

0 commit comments

Comments
 (0)