Skip to content

Commit

Permalink
add license file
Browse files Browse the repository at this point in the history
  • Loading branch information
xwa153 committed May 10, 2024
1 parent a8144fd commit b017be2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*
*/*
!dist/*
!LICENSE
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
run: |
${{ matrix.env }} go env
mkdir dist out
cp $GITHUB_WORKSPACE/LICENSE dist/LICENSE.txt
${{ matrix.env }} go build -tags=${{ matrix.gotags }} -ldflags="$LDFLAGS" -o dist/ .
zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}${{ matrix.fips }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip dist/
if [ "${{ matrix.goarch }}" = "amd64" ]; then
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ARG TARGETOS TARGETARCH
# Export BIN_NAME for the CMD below, it can't see ARGs directly.
ENV BIN_NAME=$BIN_NAME
ENV VERSION=$PRODUCT_VERSION
ENV PRODUCT_NAME=$BIN_NAME

LABEL description="consul-ecs provides first-class integration between Consul and AWS ECS." \
maintainer="Consul Team <[email protected]>" \
Expand All @@ -35,6 +36,7 @@ LABEL description="consul-ecs provides first-class integration between Consul an
org.opencontainers.image.title=$BIN_NAME \
org.opencontainers.image.url="https://www.consul.io/" \
org.opencontainers.image.vendor="HashiCorp" \
org.opencontainers.image.licenses="MPL-2.0" \
org.opencontainers.image.version=$PRODUCT_VERSION

# Create a non-root user to run the software.
Expand Down Expand Up @@ -63,6 +65,7 @@ RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2
USER $BIN_NAME
ENTRYPOINT ["/bin/consul-ecs"]
COPY dist/$TARGETOS/$TARGETARCH/$BIN_NAME /bin/
COPY LICENSE /usr/share/doc/$PRODUCT_NAME/LICENSE.txt
COPY --from=go-discover /go/bin/discover /bin/

# Separate FIPS target to accomodate CRT label assumptions
Expand Down

0 comments on commit b017be2

Please sign in to comment.