File tree Expand file tree Collapse file tree 3 files changed +63
-1
lines changed
Expand file tree Collapse file tree 3 files changed +63
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ Unreleased]
4+
5+ ### Added
6+
7+ * Add Dockerfile to build and run the application in a container
8+
39## [ 1.7.0] - 2024-11-24
410
511### Added
Original file line number Diff line number Diff line change 1+ # Stage 1: Build the application
2+ FROM golang:1.23-alpine AS builder
3+
4+ ARG VERSION=v1.7.0
5+ ARG URL=https://github.com/LordPax/go-scan2epub
6+
7+ WORKDIR /app
8+
9+ RUN apk add --no-cache git && \
10+ git clone --branch ${VERSION} ${URL} . && \
11+ go mod download && \
12+ go build -o scan2epub
13+
14+ # Stage 2: Create the final lightweight image
15+ FROM alpine:latest
16+
17+ RUN apk add --no-cache ca-certificates
18+
19+ WORKDIR /
20+
21+ COPY --from=builder /app/scan2epub /scan2epub
22+
23+ RUN mkdir books
24+
25+ VOLUME ["/root/.config/scan2epub" , "/books" ]
26+
27+ CMD ["/scan2epub" , "inter" ]
Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ default="onepiece"
5454name =" One Piece"
5555author =" Echiro Oda"
5656url =" https://lelscans.net/mangas/one-piece/{chap}/{page}.{ext}"
57- epub_dir =" /home/lordpax/Perso/epub/onepiece/"
57+ epub_dir =" /home/lordpax/scan2epub"
58+ # epub_dir="/books" # Use this line if you are using docker
5859file_name =" {author} - {name} {chap}.epub"
5960description =" Scan of One Piece generated by scan2epub"
6061
@@ -88,3 +89,31 @@ cron_chap=1132
8889* ` {author} ` : Author of the manga
8990* ` {name} ` : Name of the manga
9091* ` {chap} ` : Chapter number
92+
93+ ## Docker
94+
95+ 1 . Build the image:
96+
97+ ``` bash
98+ docker build -t scan2epub .
99+ ```
100+
101+ 2 . Run the container:
102+
103+ ``` bash
104+ docker run -d --rm --name test -v ./config:/root/.config/scan2epub -v ./books:/books scan2epub:latest
105+ ```
106+
107+ ## Docker compose
108+
109+ ``` yaml
110+ version : ' 3.7'
111+
112+ services :
113+ scan2epub :
114+ image : scan2epub:latest
115+ container_name : scan2epub
116+ volumes :
117+ - ./config:/root/.config/scan2epub
118+ - ./books:/books
119+ ` ` `
You can’t perform that action at this time.
0 commit comments