Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions dockerfiles/resec/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Build
FROM golang:1.20-bookworm@sha256:9fa9101141c01e9440216d32eb2b380b3c3079bea07aeab3546020cc91b3662c AS builder
FROM golang:1.24-trixie@sha256:5835f052b784aa39f2fe9070def3568605c8bc3fcd810f10402066348b61e716 AS builder

ENV VERSION=v1.5.2

# hadolint ignore=DL3003
# FIXME: `git checkout "tags/${VERSION}"`
WORKDIR /go/resec

RUN set -x \
&& git clone https://github.com/Aireuropa/resec \
&& cd /go/resec \
&& git clone https://github.com/Aireuropa/resec . \
&& git checkout "tags/${VERSION}" \
&& env CGO_ENABLED=0 GOOS=linux go build -ldflags="-X 'main.Version=${VERSION}'" -a -installsuffix cgo -o build/resec .
&& env CGO_ENABLED=0 GOOS=linux go build -ldflags="-X 'main.Version=${VERSION}'" -a -installsuffix cgo -o build/resec .

# Run
FROM debian:12-slim@sha256:f70dc8d6a8b6a06824c92471a1a258030836b26b043881358b967bf73de7c5ab
FROM debian:13-slim@sha256:f6e2cfac5cf956ea044b4bd75e6397b4372ad88fe00908045e9a0d21712ae3ba

ARG BUILD_DATE
ARG VCS_REF

LABEL org.label-schema.build-date="$BUILD_DATE" \

Check warning on line 19 in dockerfiles/resec/Dockerfile

View workflow job for this annotation

GitHub Actions / build (dockerfiles/resec/Dockerfile)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$VERSION' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
org.label-schema.name="resec" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://github.com/Aireuropa/resec" \
Expand All @@ -40,7 +39,7 @@
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates=20230311+deb12u1 \
ca-certificates=20250419 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
4 changes: 2 additions & 2 deletions tests/resec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ commandTests:
command: 'sha256sum'
args: ['/usr/local/bin/resec']
expectedOutput:
- '5d064b1648bdbb5ed6bd17f2eed955a1ba9a7141889876c606c02944e1803315'
- '7177468997223c63f3a0319dfcbfa3b2a9a24921bbd38d4eac38af34331f6555'

- name: 'resec version check'
command: '/usr/local/bin/resec'
args: ['-version']
exitCode: 0
expectedOutput:
- 'resec version v1.1.2'
- 'resec version v1.5.2'
Loading