Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 6e9939e

Browse files
authored
Merge pull request #14 from algomaster99/dockerize
Dockerize CLI
2 parents 3e1eafa + 2bd54d2 commit 6e9939e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM ruby:4.0-alpine
2+
3+
RUN apk add --no-cache \
4+
build-base \
5+
git \
6+
libgit2-dev \
7+
cmake
8+
9+
RUN gem install git-pkgs
10+
11+
# The git repository (the mounted directory) has different ownership that the root user of the container.
12+
# Due to an update in git, a different user cannot perform git operations on the mounted directory.
13+
# This command allows the any user to perform git operations on the mounted directory.
14+
RUN git config --system --add safe.directory /mnt
15+
16+
WORKDIR /mnt
17+
18+
ENTRYPOINT ["git", "pkgs"]

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ Or with RubyGems:
2323
gem install git-pkgs
2424
```
2525

26+
Or using Docker:
27+
28+
```bash
29+
docker build -t git-pkgs .
30+
docker run -it --rm -v $(pwd):/mnt git-pkgs <subcommand>
31+
```
32+
2633
## Quick start
2734

2835
```bash

0 commit comments

Comments
 (0)