File tree Expand file tree Collapse file tree 4 files changed +44
-10
lines changed
Expand file tree Collapse file tree 4 files changed +44
-10
lines changed Original file line number Diff line number Diff line change 1515 - checkout
1616 - run : *okteto-login
1717 - run :
18- name : Build Image
19- command : make build
18+ name : Build Rootful Image
19+ command : make build-rootful
20+ - run :
21+ name : Build Rootless Image
22+ command : make build-rootless
2023 release :
2124 docker :
2225 - image : cimg/base:current
2528 - run : *okteto-login
2629 - run : *docker-login
2730 - run :
28- name : Build and Push Image
29- command : make push
31+ name : Build and Push Rootful Image
32+ command : make push-rootful
33+ - run :
34+ name : Build and Push Rootless Image
35+ command : make push-rootless
3036
3137workflows :
3238 version : 2
Original file line number Diff line number Diff line change 11# syntax = docker/dockerfile:experimental
2- FROM debian:bookworm-slim
2+ FROM debian:bookworm-slim as base
33
44COPY --from=cuelang/cue:0.9.2 /usr/bin/cue /usr/local/bin/cue
55COPY --from=mikefarah/yq:4 /usr/bin/yq /usr/local/bin/yq
@@ -19,3 +19,13 @@ RUN apt clean && apt update && \
1919 wait-for-it \
2020 jq \
2121 netcat-traditional
22+
23+ FROM base as rootless
24+
25+ RUN addgroup --gid 1000 runner && \
26+ adduser --disabled-login --home /home/runner --ingroup runner --uid 1000 runner
27+
28+ USER 1000
29+
30+ # keep basic container image build rootful as before
31+ FROM base as rootful
Original file line number Diff line number Diff line change 11CIRCLE_TAG ?= dev
22
3- build :
4- okteto build --platform linux/amd64,linux/arm64 -f Dockerfile .
3+ # keep ' build' makefile step rootful for backwards compatibility
4+ build : build-rootful
55
6- push :
7- okteto build -t okteto/pipeline-runner:${CIRCLE_TAG} --platform linux/amd64,linux/arm64 -f Dockerfile .
6+ build-rootful :
7+ okteto build --platform linux/amd64,linux/arm64 -f Dockerfile --target rootful .
8+
9+ build-rootless :
10+ okteto build --platform linux/amd64,linux/arm64 -f Dockerfile --target rootless .
11+
12+ # keep 'push' makefile step rootful for backwards compatibility
13+ push : push-rootful
14+
15+ push-rootful :
16+ okteto build -t okteto/pipeline-runner:${CIRCLE_TAG} --platform linux/amd64,linux/arm64 -f Dockerfile --target rootful .
17+
18+ push-rootless :
19+ okteto build -t okteto/pipeline-runner:${CIRCLE_TAG} -rootless --platform linux/amd64,linux/arm64 -f Dockerfile --target rootless .
20+
21+ push-dev-rootful :
22+ okteto build -t okteto.dev/pipeline-runner:dev --platform linux/amd64,linux/arm64 -f Dockerfile --target rootful .
23+
24+ push-dev-rootless :
25+ okteto build -t okteto.dev/pipeline-runner:dev-rootless --platform linux/amd64,linux/arm64 -f Dockerfile --target rootless .
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ installer:
1717 runner: okteto/pipeline-runner:1.0.0
1818```
1919
20- replacing ` okteto/pipeline-runner:1.0.0 ` by your own pipeline runner image.
20+ replacing ` okteto/pipeline-runner:1.0.0 ` by your own pipeline runner image.
You can’t perform that action at this time.
0 commit comments