Skip to content

Commit d8cd51e

Browse files
committed
Changing the formatting for releaser/dockerfile
1 parent df7cca0 commit d8cd51e

File tree

2 files changed

+33
-7
lines changed

2 files changed

+33
-7
lines changed

.goreleaser.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,18 @@ changelog:
7474
dockers:
7575
- image_templates:
7676
- "ghcr.io/larkinwc/proxmox-lxc-compose:{{ .Version }}"
77+
- "ghcr.io/larkinwc/proxmox-lxc-compose:v{{ .Major }}"
78+
- "ghcr.io/larkinwc/proxmox-lxc-compose:v{{ .Major }}.{{ .Minor }}"
7779
- "ghcr.io/larkinwc/proxmox-lxc-compose:latest"
7880
dockerfile: Dockerfile
7981
use: buildx
8082
build_flag_templates:
8183
- "--platform=linux/amd64"
82-
- "--label=org.opencontainers.image.created={{.Date}}"
83-
- "--label=org.opencontainers.image.title={{.ProjectName}}"
84-
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
85-
- "--label=org.opencontainers.image.version={{.Version}}"
84+
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
85+
- "--label=org.opencontainers.image.description=A docker-compose like tool for managing LXC containers in Proxmox"
86+
- "--label=org.opencontainers.image.url=https://github.com/larkinwc/proxmox-lxc-compose"
87+
- "--label=org.opencontainers.image.source=https://github.com/larkinwc/proxmox-lxc-compose"
88+
- "--label=org.opencontainers.image.version={{ .Version }}"
89+
- "--label=org.opencontainers.image.created={{ .Date }}"
90+
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
91+
- "--label=org.opencontainers.image.licenses=MIT"

Dockerfile

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1-
FROM alpine:latest
1+
# Using a specific version of Alpine for better reproducibility
2+
FROM alpine:3.19
23

3-
RUN apk add --no-cache lxc docker-cli
4+
# Add labels that will be populated by GoReleaser
5+
LABEL org.opencontainers.image.source="https://github.com/larkinwc/proxmox-lxc-compose"
6+
LABEL org.opencontainers.image.description="A docker-compose like tool for managing LXC containers in Proxmox"
7+
LABEL org.opencontainers.image.licenses="MIT"
48

9+
# Install dependencies
10+
RUN apk add --no-cache \
11+
lxc \
12+
docker-cli
13+
14+
# Create a non-root user and group
15+
RUN addgroup -S lxccompose && adduser -S lxccompose -G lxccompose
16+
17+
# Copy the binary from the GoReleaser build
518
COPY lxc-compose /usr/local/bin/
19+
RUN chmod +x /usr/local/bin/lxc-compose
20+
21+
# Use the non-root user
22+
USER lxccompose
623

7-
ENTRYPOINT ["lxc-compose"]
24+
# Set the entrypoint
25+
ENTRYPOINT ["/usr/local/bin/lxc-compose"]
26+
# Provide a default command that can be overridden
27+
CMD ["--help"]

0 commit comments

Comments
 (0)