Skip to content

Commit

Permalink
disable distroless
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandr Zimin <[email protected]>
  • Loading branch information
AleksZimin committed Sep 20, 2024
1 parent 7f1619b commit 65f1703
Showing 1 changed file with 1 addition and 54 deletions.
55 changes: 1 addition & 54 deletions images/csi-nfs/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,67 +34,14 @@ shell:
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /nfsplugin
- chmod +x /nfsplugin

---
{{ $csiBinaries := "/bin/mount /bin/umount /sbin/mount.nfs /sbin/mount.nfs4 /sbin/umount.nfs /sbin/umount.nfs4 /bin/tar /bin/gzip /bin/cp" }}
---
image: {{ $.ImageName }}-binaries-artifact
from: {{ $.BASE_ALT_DEV }}
final: false

shell:
install:
- /binary_replace.sh -i "{{ $csiBinaries }}" -o /relocate

---
image: {{ $.ImageName }}-distroless-artifact
from: {{ $.BASE_ALPINE_DEV }}
final: false

shell:
install:
- mkdir -p /relocate/bin /relocate/sbin /relocate/etc /relocate/etc/ssl /relocate/usr/bin /relocate/usr/sbin /relocate/usr/share
- cp -pr /tmp /relocate
- cp -pr /etc/passwd /etc/group /etc/hostname /etc/hosts /etc/shadow /etc/protocols /etc/services /etc/nsswitch.conf /relocate/etc
- cp -pr /usr/share/ca-certificates /relocate/usr/share
- cp -pr /usr/share/zoneinfo /relocate/usr/share
- cp -pr etc/ssl/cert.pem /relocate/etc/ssl
- cp -pr /etc/ssl/certs /relocate/etc/ssl
- echo "deckhouse:x:64535:64535:deckhouse:/:/sbin/nologin" >> /relocate/etc/passwd
- echo "deckhouse:x:64535:" >> /relocate/etc/group
- echo "deckhouse:!::0:::::" >> /relocate/etc/shadow

---
image: {{ $.ImageName }}-distroless
from: {{ $.BASE_SCRATCH }}
final: false

import:
- image: {{ $.ImageName }}-distroless-artifact
add: /relocate
to: /
before: setup

---
image: {{ $.ImageName }}
fromImage: {{ $.ImageName }}-distroless
fromImage: {{ $.BASE_ALT_DEV }}

import:
- image: {{ $.ImageName }}-golang-artifact
add: /nfsplugin
to: /nfsplugin
before: setup
- image: {{ $.ImageName }}-binaries-artifact
add: /relocate
to: /
before: install
includePaths:
- '**/*'
- image: {{ $.ImageName }}-binaries-artifact
add: /lib64
to: /lib64
before: install
includePaths:
- 'libresolv*'
- 'libnss_dns*'
docker:
ENTRYPOINT: ["/nfsplugin"]

0 comments on commit 65f1703

Please sign in to comment.