Skip to content

Commit 6119e3b

Browse files
committed
add snap definition to devcontainer + snapcraft file
1 parent 6c01204 commit 6119e3b

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

.devcontainer/Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,20 @@ FROM mcr.microsoft.com/devcontainers/rust:latest
44
# Install Required Dependencies
55
RUN apt-get -qq update
66
RUN apt-get install -y build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm
7+
8+
# Install snapd and its dependencies
9+
RUN apt-get install -y snapd fuse squashfuse sudo gh
10+
11+
# Create a script to start snapd
12+
RUN echo '#!/bin/bash\n\
13+
/usr/lib/snapd/snapd &\n\
14+
sleep 5\n\
15+
exec "$@"' > /start-snapd.sh && \
16+
chmod +x /start-snapd.sh
17+
18+
19+
VOLUME ["/sys/fs/cgroup"]
20+
21+
# Use the script as the entry point
22+
ENTRYPOINT ["/start-snapd.sh"]
23+
CMD ["bash"]

.devcontainer/devcontainer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"github.copilot-chat"
1717
]
1818
}
19-
}
19+
},
20+
"runArgs": ["--privileged", "-v", "/sys/fs/cgroup:/sys/fs/cgroup:ro", "-v", "/tmp:/tmp"]
2021
}

.packaging/snaps/snapcraft.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: grin
2+
version: v5.1.0
3+
summary: Minimal implementation of the Mimblewimble protocol
4+
description: |
5+
https://grin.mw/
6+
7+
epoch: 3*
8+
confinement: strict
9+
grade: stable
10+
base: core18
11+
parts:
12+
grin:
13+
plugin: rust
14+
source: https://github.com/mimblewimble/grin.git
15+
source-tag: v5.1.0
16+
build-packages:
17+
- clang
18+
- libncurses5-dev
19+
- libncursesw5-dev
20+
21+
apps:
22+
grin:
23+
environment:
24+
LC_ALL: C.UTF-8
25+
LANG: C.UTF-8
26+
command: bin/grin
27+
plugs: [network, network-bind]

0 commit comments

Comments
 (0)