Skip to content

Commit bd8525d

Browse files
committed
Mostly a wrapper around docker hub now.
1 parent 31c2777 commit bd8525d

File tree

4 files changed

+49
-48
lines changed

4 files changed

+49
-48
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ build/
55
*~
66
*.bak
77

8+
publish.sh

Makefile

+11-7
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,34 @@ VERSION=1.0.0-alpha
33

44
TAG=${ARCH}-${VERSION}
55

6-
all: dist/pijul-${TAG} dist/pijul-serve-${TAG}.tar.gz
6+
all: dist/pijul-${TAG} dist/pijul-bootstrap-${TAG}.tar.gz
77

88
dist/pijul dist/pijul-${TAG} dist/pijul-${TAG}.tar : .image build/pijul-${TAG}
99
rm -rf dist
1010
mkdir dist
1111
cp build/pijul-${TAG} dist/pijul-${TAG}
1212
rm -rf build
13-
docker save -o dist/pijul-serve-${TAG}.tar pijul-serve:${TAG}
14-
gzip dist/pijul-serve-${TAG}.tar
13+
docker save -o dist/pijul-bootstrap-${TAG}.tar pijul-bootstrap:${TAG}
14+
gzip dist/pijul-bootstrap-${TAG}.tar
1515

1616
build/pijul-${TAG}: .image
1717
rm -rf build && mkdir -p build
18-
docker run -v "$(PWD)/build:/build:rw" --entrypoint /bin/cp pijul-serve:${TAG} /usr/local/bin/pijul /build/pijul-${TAG}
18+
docker run -v "$(PWD)/build:/build:rw" --entrypoint /bin/cp pijul-bootstrap:${TAG} /usr/local/bin/pijul /build/pijul-${TAG}
1919

2020
.image: Dockerfile
21-
docker build -t pijul-serve:${TAG} .
22-
docker tag pijul-serve:${TAG} pijul-serve:latest
21+
docker build -t pijul-bootstrap:${TAG} .
22+
docker tag pijul-bootstrap:${TAG} pijul-bootstrap:latest
2323
touch .image
2424

2525
run: .image
26-
docker run -ti pijul-serve:${TAG} pijul
26+
docker run -ti pijul-bootstrap:${TAG} pijul
2727

2828
clean:
2929
rm -rf dist build .image
3030

31+
# developers only
32+
publish: .image ./publish.sh
33+
./publish.sh "${TAG}"
34+
3135
.PHONY: dist
3236

README.adoc

+36-40
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,79 @@
11
= Pijul Bootstrap
22

3-
This is a quick way to get started with https://pijul.org[Pijul]. Pijul is a **much better** version control system than `git`, but is a bit painful to initially install, because it depends on either itself or rust+cargo+nix.
3+
This is a quick way to get started with https://pijul.org[Pijul].
44

5-
Instead, this repo provides `pijul`` as:
5+
Pijul is a **much better** version control system than `git`, but is a bit painful to initially install, because it depends on either itself or rust+cargo+nix. I think that Pijul deserves to do better, and making it easier to get started with will probably help, so this is an easier way.
66

7-
- a pre-compiled as a binary for amd64 linux, which only needs some commonly available distro libraries
8-
- a Docker Linux container image tarball, which you can download, import, and run (or use as a base image to extend) with no further dependencies (except docker/podman)
9-
- A simple `pij` script that runs the docker image provided above (once it has been manually installed - a docker upload will come soon, meaning no manual installation other than the script itself).
7+
This repo provides `pijul` as:
108

11-
== Binary executable installation
9+
- (primarily) a wrapper script that "just works", if you have docker installed and working.
10+
- (optionally) a pre-compiled as a binary for amd64 linux, which only needs some commonly available distro libraries
1211
13-
1. Download the latest pijul-$VERSION-$ARCH release executable and install it **(as root)** to /usr/local/bin (set VERSION and ARCH to match what you downloaded, of course):
12+
13+
== User-only install (for docker):
14+
15+
1. Download the `bin/pij` script, and install it to `$HOME/.local/bin`:
1416
+
1517
[source,shell]
1618
----
17-
VERSION=1.0.0-alpha
18-
ARCH=x86_64
19-
install pijul-$ARCH-$VERSION /usr/local/bin/pijul
19+
install pij $HOME/.local/bin
2020
----
2121

22-
2. Install the dependencies.
22+
2. Add this directory to your shell path. For bash, for example:
2323
+
24-
For debian-likes (Debian, Ubuntu, Devuan), this command is:
2524
[source,shell]
2625
----
27-
RUN apt-get update && apt-get install -y libsodium23 libssl3
26+
echo >> ~/.bashrc 'export PATH="$HOME/.local/bin:$PATH"'
2827
----
2928

30-
3. Run `pijul` as usual
31-
29+
3. Run `pijul` as normal, per the official documentation.
3230

33-
== Docker image
3431

35-
The docker image can be downloaded from releases, and used as follows (again, set VERSION and ARCH to match what you downloaded, of course):
32+
== System-wide install (for docker):
3633

37-
1. Import the docker save image:
34+
1. Download the `bin/pij` script, and install it **(as root)**, to `/usr/local/bin/pijul`:
3835
+
3936
[source,shell]
4037
----
41-
VERSION=1.0.0-alpha
42-
ARCH=x86_64
43-
gunzp pijul-serve-${ARCH}-${VERSION}.tar.gz
44-
docker import pijul-serve-${ARCH}-${VERSION}.tar
38+
install pij /usr/local/bin/pijul
4539
----
4640

47-
3. Tag the version as the latest one:
41+
42+
== Binary executable installation
43+
44+
1. Download the latest pijul-$VERSION-$ARCH release executable and install it **(as root)** to /usr/local/bin (set VERSION and ARCH to match what you downloaded, of course):
4845
+
4946
[source,shell]
5047
----
51-
docker tag pijul-serve:${ARCH}-${VERSION} pijul-serve:latest
48+
VERSION=1.0.0-alpha
49+
ARCH=x86_64
50+
install pijul-$ARCH-$VERSION /usr/local/bin/pijul
5251
----
5352

54-
4. Run `pijul` using docker
55-
+
56-
You need to map the directory that you want to work in to /workspace, and also be sure to run it as your current user and group id, so that any files are created as you.
53+
2. Install the dependencies.
5754
+
55+
For debian-likes (Debian, Ubuntu, Devuan), this command is:
5856
[source,shell]
5957
----
60-
docker run -u `id -u`:`id -g` -v $(pwd):/workspace -ti pijul-serve
58+
RUN apt-get update && apt-get install -y libsodium23 libssl3
6159
----
62-
+
63-
See below on a script that simplifies this step.
6460

65-
== `pij` wrapper for docker
61+
3. Run `pijul` as usual
6662

67-
1. Download and install the `bin/pij` script **(as root)**:
68-
+
69-
[source,shell]
70-
----
71-
install pij /usr/local/bin
72-
----
7363

74-
2. Run `pij` instead of the more complex `docker run` command given above. They're essentially the same.
64+
== Docker image (from docker hub)
65+
66+
This may be useful if you want to build another container that pijul, such as a container-based pijul repo server. However, you are advised to study the Dockerfile and build your own as needed, rather than relying on this for production updates etc.
67+
+
68+
1. Run `docker pull leebraid/pijul-bootstrap:latest`.
69+
2. Use the `pijul` command within the docker container as usual (consult the docker documentation if unsure at this point).
70+
3. To use this in a Dockerfile, of course just do `FROM docker.io/leebraid/pijul-bootstrap:latest AS base`, or whatever.
7571

76-
3. From now on, you can use `pij` per the documentation for `pijul` on the official website.
7772

7873
== Contributing
7974

8075
- Please fork the code and submit a PR for any improvements. In particular, the following improvements are welcome:
8176

82-
+ Making the rust build fully static
77+
+ Making the rust binary executable build fully static
8378
+ Library installation instructions for distros other than debian-likes.
79+
+ automated CI/CD updates from the pijul repo, so I don't have to maintain this ;)

bin/pij

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22

3-
docker run -u `id -u`:`id -g` -v $(pwd):/workspace -ti pijul-serve "$@"
3+
docker run -u `id -u`:`id -g` -v $(pwd):/workspace -ti leebraid/pijul-bootstrap:latest "$@"
44

0 commit comments

Comments
 (0)