From b69bfb9d049af502694eed7957b44de6a75c2a2d Mon Sep 17 00:00:00 2001 From: wangxinyi7 Date: Fri, 27 Sep 2024 09:56:25 -0700 Subject: [PATCH] add license file to linux distribution and docker image (#25) --- .github/workflows/build.yml | 3 +++ Dockerfile | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e857e1cd..be637576 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,6 +87,7 @@ jobs: arch: ${{ matrix.goarch }} reproducible: report instructions: | + cp LICENSE $TARGET_DIR/LICENSE.txt make build build-linux: @@ -119,6 +120,7 @@ jobs: arch: ${{ matrix.goarch }} reproducible: report instructions: | + cp LICENSE $TARGET_DIR/LICENSE.txt make build build-darwin: @@ -154,6 +156,7 @@ jobs: arch: ${{ matrix.goarch }} reproducible: report instructions: | + cp LICENSE $TARGET_DIR/LICENSE.txt make build build-docker-default: diff --git a/Dockerfile b/Dockerfile index efde1de9..5f566d79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,15 +8,18 @@ ARG TARGETOS ARG TARGETARCH ARG PRODUCT_VERSION ARG BIN_NAME +ENV PRODUCT_NAME=$BIN_NAME LABEL name="http-echo" \ maintainer="HashiCorp Consul Team " \ vendor="HashiCorp" \ version=$PRODUCT_VERSION \ release=$PRODUCT_VERSION \ - summary="A test webserver that echos a response. You know, for kids." + licenses="MPL-2.0" \ + summary="A test webserver that echos a response. You know, for kids." COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME / +COPY LICENSE /usr/share/doc/$PRODUCT_NAME/LICENSE.txt EXPOSE 5678/tcp