Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Base image to use for the final stage
ARG base_image=public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:2021-12-01-1638322424
# Build the manager binary
# TODO(vijtrip2) move this builder image to public.ecr.aws/eks-distro-build-tooling/builder-base, when builder-base
# supports golang 1.17
FROM public.ecr.aws/bitnami/golang:1.17.5 as builder

ARG service_alias
Expand Down Expand Up @@ -46,4 +48,6 @@ ARG service_alias
ARG work_dir=/github.com/aws-controllers-k8s/$service_alias-controller
WORKDIR /
COPY --from=builder $work_dir/bin/controller $work_dir/LICENSE $work_dir/ATTRIBUTION.md /bin/
# Make this image non-root by default
USER 1000
ENTRYPOINT ["/bin/controller"]
3 changes: 3 additions & 0 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Base image to use at runtime
ARG base_image=public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:2021-12-01-1638322424
# Build the manager binary
# TODO(vijtrip2) move this builder image to public.ecr.aws/eks-distro-build-tooling/builder-base, when builder-base
# supports golang 1.17
FROM public.ecr.aws/bitnami/golang:1.17.5 as builder

ARG service_alias
Expand Down Expand Up @@ -58,4 +60,5 @@ ARG service_alias
ARG work_dir=/github.com/aws-controllers-k8s/$service_alias-controller
WORKDIR /
COPY --from=builder $work_dir/bin/controller $work_dir/LICENSE $work_dir/ATTRIBUTION.md /bin/
USER 1000
ENTRYPOINT ["/bin/controller"]
1 change: 0 additions & 1 deletion templates/config/controller/deployment.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ spec:
allowPrivilegeEscalation: false
privileged: false
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
Expand Down
1 change: 0 additions & 1 deletion templates/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ spec:
allowPrivilegeEscalation: false
privileged: false
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
Expand Down