add snap definition to devcontainer + snapcraft file

This commit is contained in:
yeastplume 2024-11-13 13:09:08 +00:00
parent 6c012043c0
commit 6119e3bd24
3 changed files with 46 additions and 1 deletions

View file

@ -4,3 +4,20 @@ FROM mcr.microsoft.com/devcontainers/rust:latest
# Install Required Dependencies # Install Required Dependencies
RUN apt-get -qq update RUN apt-get -qq update
RUN apt-get install -y build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm RUN apt-get install -y build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm
# Install snapd and its dependencies
RUN apt-get install -y snapd fuse squashfuse sudo gh
# Create a script to start snapd
RUN echo '#!/bin/bash\n\
/usr/lib/snapd/snapd &\n\
sleep 5\n\
exec "$@"' > /start-snapd.sh && \
chmod +x /start-snapd.sh
VOLUME ["/sys/fs/cgroup"]
# Use the script as the entry point
ENTRYPOINT ["/start-snapd.sh"]
CMD ["bash"]

View file

@ -16,5 +16,6 @@
"github.copilot-chat" "github.copilot-chat"
] ]
} }
} },
"runArgs": ["--privileged", "-v", "/sys/fs/cgroup:/sys/fs/cgroup:ro", "-v", "/tmp:/tmp"]
} }

View file

@ -0,0 +1,27 @@
name: grin
version: v5.1.0
summary: Minimal implementation of the Mimblewimble protocol
description: |
https://grin.mw/
epoch: 3*
confinement: strict
grade: stable
base: core18
parts:
grin:
plugin: rust
source: https://github.com/mimblewimble/grin.git
source-tag: v5.1.0
build-packages:
- clang
- libncurses5-dev
- libncursesw5-dev
apps:
grin:
environment:
LC_ALL: C.UTF-8
LANG: C.UTF-8
command: bin/grin
plugs: [network, network-bind]