Skip to content

Commit

Permalink
Fix for canonical#169 'snap execution of /usr/bin/ssh fails'
Browse files Browse the repository at this point in the history
canonical#170

added ssh-keys interface
added ssh-public-keys interface
added openssh-client for staging
added bind-file layout for /use/bin/ssh
  • Loading branch information
hartmutobendorf committed Aug 21, 2024
1 parent 3cf4c1d commit fdf8f52
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: docker
#title: Docker
version: '24.0.5'
version: "24.0.5"
summary: Docker container runtime
description: |
Build and run container images with Docker.
Expand Down Expand Up @@ -47,12 +47,14 @@ layout:
bind-file: $SNAP_DATA/etc/gitconfig
/usr/libexec/docker/cli-plugins:
symlink: $SNAP/usr/libexec/docker/cli-plugins
/usr/bin/ssh:
bind-file: $SNAP/usr/bin/ssh

environment:
GIT_EXEC_PATH: "$SNAP/usr/lib/git-core"
GIT_TEMPLATE_DIR: "$SNAP/usr/share/git-core/templates"
# For nvidia support #
LD_LIBRARY_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET}:${SNAP}/lib/:${SNAP}/lib/${CRAFT_ARCH_TRIPLET}:${SNAP}/usr/lib/:${SNAP}/usr/lib/${CRAFT_ARCH_TRIPLET}
LD_LIBRARY_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET}:${SNAP}/lib/:${SNAP}/lib/${CRAFT_ARCH_TRIPLET}:${SNAP}/usr/lib/:${SNAP}/usr/lib/${CRAFT_ARCH_TRIPLET}
LIBGL_DRIVERS_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET}/dri
LIBVA_DRIVERS_PATH: $SNAP/graphics/lib/${CRAFT_ARCH_TRIPLET}/dri
# nvidia-container-runtime can only set alternative config directory via XDG_CONFIG_HOME #
Expand Down Expand Up @@ -104,6 +106,8 @@ apps:
- network
- home
- removable-media
- ssh-keys
- ssh-public-keys

dockerd:
command: bin/dockerd-wrapper
Expand Down Expand Up @@ -165,6 +169,13 @@ parts:
- jq
- pciutils

ssh:
plugin: nil
stage-packages:
- openssh-client
# stage:
# - /usr/bin/ssh

engine:
plugin: make
source: https://github.com/moby/moby.git
Expand Down Expand Up @@ -192,7 +203,7 @@ parts:
# install docker-proxy previously provided by libnetwork part
install -T bundles/dynbinary-daemon/docker-proxy "$CRAFT_PART_INSTALL/bin/docker-proxy"
# https://github.com/moby/moby/blob/v24.0.5/Dockerfile.simple (Docker-supported Go version for Engine)
build-snaps: &go ['go/1.20/stable']
build-snaps: &go ["go/1.20/stable"]
# we get weird behavior if we mix/match Go versions throughout this one snapcraft.yml, so we use a YAML reference here to ensure we're always consistent throughout
after: [wrapper-scripts]
build-packages:
Expand Down Expand Up @@ -299,7 +310,7 @@ parts:
source-tag: v0.19.0
source-depth: 1
organize:
'usr/local/bin/tini-static': bin/docker-init
"usr/local/bin/tini-static": bin/docker-init
build-packages:
- build-essential
prime:
Expand Down Expand Up @@ -366,5 +377,4 @@ lint:
- library:
- usr/lib/**/libltdl.so.*
- usr/lib/**/libnvidia-container-go.so.*

# vim:set et ts=2 sw=2:

0 comments on commit fdf8f52

Please sign in to comment.