Skip to content

Commit

Permalink
add snap definition to devcontainer + snapcraft file
Browse files Browse the repository at this point in the history
  • Loading branch information
yeastplume committed Nov 13, 2024
1 parent 6c01204 commit 6119e3b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,20 @@ FROM mcr.microsoft.com/devcontainers/rust:latest
# Install Required Dependencies
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

# 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"]
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"github.copilot-chat"
]
}
}
},
"runArgs": ["--privileged", "-v", "/sys/fs/cgroup:/sys/fs/cgroup:ro", "-v", "/tmp:/tmp"]
}
27 changes: 27 additions & 0 deletions .packaging/snaps/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit 6119e3b

Please sign in to comment.