2021-07-15 16:56:03 +00:00
|
|
|
# How to build GoBlog
|
|
|
|
|
|
|
|
There are two ways to build GoBlog:
|
|
|
|
|
|
|
|
## With Docker
|
|
|
|
|
2021-12-24 12:23:45 +00:00
|
|
|
(There are already pre-built images available at `ghcr.io/jlelse/goblog:latest` and `ghcr.io/jlelse/goblog:tools`)
|
2021-07-15 16:56:03 +00:00
|
|
|
|
|
|
|
- Linux
|
|
|
|
- git
|
|
|
|
- docker
|
|
|
|
|
|
|
|
Build command:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://git.jlel.se/jlelse/GoBlog.git
|
|
|
|
cd GoBlog
|
2021-12-24 12:23:45 +00:00
|
|
|
docker build -t ghcr.io/jlelse/goblog:latest . --target base
|
2021-07-15 16:56:03 +00:00
|
|
|
```
|
|
|
|
|
2021-12-06 20:30:18 +00:00
|
|
|
If you want to build and use the advanced image (with additional tools), execute:
|
2021-07-15 16:56:03 +00:00
|
|
|
|
|
|
|
```bash
|
2021-12-24 12:23:45 +00:00
|
|
|
docker build -t ghcr.io/jlelse/goblog:tools . --target tools
|
2021-07-15 16:56:03 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## With Go installed
|
|
|
|
|
|
|
|
Requirements:
|
|
|
|
|
|
|
|
- Linux
|
|
|
|
- git
|
2021-08-17 05:55:50 +00:00
|
|
|
- go >= 1.17
|
2021-07-17 07:33:44 +00:00
|
|
|
- libsqlite3 with FTS5 enabled >= 3.31 (the newer the better)
|
2021-07-15 16:56:03 +00:00
|
|
|
|
|
|
|
Build command:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://git.jlel.se/jlelse/GoBlog.git
|
|
|
|
cd GoBlog
|
|
|
|
go build -tags=linux,libsqlite3,sqlite_fts5 -o GoBlog
|
2021-07-17 07:33:44 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Alternatively you can also compile sqlite3 directly into GoBlog. This doesn't require libsqlite3, but takes more time.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://git.jlel.se/jlelse/GoBlog.git
|
|
|
|
cd GoBlog
|
|
|
|
go build -tags=linux,sqlite_fts5 -o GoBlog
|
2021-07-15 16:56:03 +00:00
|
|
|
```
|