mirror of
https://github.com/safing/portmaster
synced 2025-09-04 19:49:15 +00:00
[build] Add spn docker image earthly target
This commit is contained in:
parent
151a548cee
commit
866aef1857
1 changed files with 24 additions and 1 deletions
25
Earthfile
25
Earthfile
|
@ -136,6 +136,29 @@ go-build:
|
||||||
|
|
||||||
SAVE ARTIFACT --keep-ts "/tmp/build/" ./output
|
SAVE ARTIFACT --keep-ts "/tmp/build/" ./output
|
||||||
|
|
||||||
|
spn-image:
|
||||||
|
# Use minimal image as base.
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
# Copy the static executable.
|
||||||
|
COPY (+go-build/output/portmaster-start --GOARCH=amd64 --GOOS=linux --CMDS=portmaster-start) /init/portmaster-start
|
||||||
|
|
||||||
|
# Copy the init script
|
||||||
|
COPY spn/tools/container-init.sh /init.sh
|
||||||
|
|
||||||
|
# Run the hub.
|
||||||
|
ENTRYPOINT ["/init.sh"]
|
||||||
|
|
||||||
|
# Get version.
|
||||||
|
LET version = "$(/init/portmaster-start version --short | tr ' ' -)"
|
||||||
|
RUN echo "Version: ${version}"
|
||||||
|
|
||||||
|
# Save dev image
|
||||||
|
SAVE IMAGE "spn:latest"
|
||||||
|
SAVE IMAGE "spn:${version}"
|
||||||
|
SAVE IMAGE "ghcr.io/safing/spn:latest"
|
||||||
|
SAVE IMAGE "ghcr.io/safing/spn:${version}"
|
||||||
|
|
||||||
# Test one or more go packages.
|
# Test one or more go packages.
|
||||||
# Test are always run as -short, as "long" tests require a full desktop system.
|
# Test are always run as -short, as "long" tests require a full desktop system.
|
||||||
# Run `earthly +go-test` to test all packages
|
# Run `earthly +go-test` to test all packages
|
||||||
|
@ -303,7 +326,7 @@ rust-base:
|
||||||
wget \
|
wget \
|
||||||
file \
|
file \
|
||||||
libsoup-3.0-dev \
|
libsoup-3.0-dev \
|
||||||
libwebkit2gtk-4.1-dev
|
libwebkit2gtk-4.1-dev
|
||||||
|
|
||||||
# Install library dependencies for all supported architectures
|
# Install library dependencies for all supported architectures
|
||||||
# required for succesfully linking.
|
# required for succesfully linking.
|
||||||
|
|
Loading…
Add table
Reference in a new issue