add light alpine-based image

This commit is contained in:
Lifailon
2026-03-06 13:43:58 +03:00
parent b38ed2c2d5
commit fc20567d1b
2 changed files with 50 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
FROM golang:1.24-alpine3.23
WORKDIR /lazyjournal
COPY go.mod go.sum ./
RUN go mod download
COPY main.go .
ARG TARGETOS TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -o /bin/lazyjournal && chmod 755 /bin/lazyjournal
COPY config.yml /bin/
ENTRYPOINT ["lazyjournal"]
+37
View File
@@ -0,0 +1,37 @@
services:
lazyjournal:
image: lifailon/lazyjournal:alpine
container_name: lazyjournal
restart: unless-stopped
privileged: true
volumes:
# Binaries and system libraries
- /usr/bin/systemctl:/usr/bin/systemctl:ro
- /usr/bin/journalctl:/usr/bin/journalctl:ro
- /usr/bin/docker:/usr/bin/docker:ro
- $HOME/.local/bin/docker-compose:/usr/bin/docker-compose:ro
- /usr/local/bin/kubectl:/usr/bin/kubectl:ro
- /lib64:/lib64:ro
- /lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:ro
# Systemd
- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro
- /run/systemd/system:/run/systemd/system:ro
- /run/systemd/journal/socket:/run/systemd/journal/socket:ro
# Journald
- /etc/machine-id:/etc/machine-id:ro
# Filesystem
- /var/log:/var/log:ro
- /opt:/opt:ro
- /home:/home:ro
# Docker socket
- /var/run/docker.sock:/var/run/docker.sock:ro
# Read docker logs from filesystem
- /var/lib/docker/containers:/var/lib/docker/containers:ro
# Kubernetes configuration
- $HOME/.kube/config:/root/.kube/config:ro
# Custom lazyjournal configuration (optional)
# - ./config.yml:/bin/config.yml:ro
environment:
- OPTIONS=
tty: true
stdin_open: true