-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hook script and Makefile entry for datanode (#253)
* Add hook script and Makefile entry for datanode * Fix path to entrypoint * Adjust Dockerfile for datanode for the build environment * Fix VCS_REF setting * Fix source URL label for data node * Add graylog-datanode to release build steps
- Loading branch information
Showing
7 changed files
with
60 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
FROM ubuntu:22.04 | ||
|
||
# Build time variables - not persistent in the container image | ||
ARG GRAYLOG_VERSION | ||
ARG VCS_REF | ||
ARG BUILD_DATE | ||
ARG BUILD_VERSION | ||
ARG SNAPSHOT_URL_X64 | ||
ARG SNAPSHOT_URL_AARCH64 | ||
ARG SNAPSHOT_URL_X64=https://downloads.graylog.org/releases/graylog-datanode/graylog-datanode-${GRAYLOG_VERSION}-linux-x64.tgz | ||
ARG SNAPSHOT_URL_AARCH64=https://downloads.graylog.org/releases/graylog-datanode/graylog-datanode-${GRAYLOG_VERSION}-linux-aarch64.tgz | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Will be persistet in the container image | ||
|
@@ -63,20 +64,21 @@ RUN apt-get purge -y curl \ | |
&& apt-get autoremove -y --purge \ | ||
&& rm -rf /var/log/* | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
COPY docker/datanode/entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["tini", "--", "/entrypoint.sh"] | ||
CMD ["graylog-datanode"] | ||
|
||
# Put at the very end to avoid rebuilding all layers for ARG changes like | ||
# BUILD_DATE, BUILD_REV, and BUILD_VERSION. | ||
# BUILD_DATE, VCS_REV, and GRAYLOG_VERSION. | ||
LABEL org.opencontainers.image.authors="Graylog, Inc. <[email protected]>" | ||
LABEL org.opencontainers.image.created="$BUILD_DATE" | ||
LABEL org.opencontainers.image.description="Container image to run the Graylog Data Node" | ||
LABEL org.opencontainers.image.documentation="https://docs.graylog.org/" | ||
LABEL org.opencontainers.image.licenses="SSPL-1.0" | ||
LABEL org.opencontainers.image.source="https://github.com/Graylog2/graylog2-server" | ||
LABEL org.opencontainers.image.revision="$VCS_REF" | ||
LABEL org.opencontainers.image.source="https://github.com/Graylog2/graylog-docker" | ||
LABEL org.opencontainers.image.title="Graylog Data Node" | ||
LABEL org.opencontainers.image.url="https://www.graylog.org/" | ||
LABEL org.opencontainers.image.vendor="Graylog, Inc." | ||
LABEL org.opencontainers.image.version="$BUILD_VERSION" | ||
LABEL org.opencontainers.image.version="$GRAYLOG_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Custom build for Docker Hub | ||
# see: https://medium.com/microscaling-systems/labelling-automated-builds-on-docker-hub-f3d073fb8e1 | ||
|
||
cd ../.. | ||
|
||
apt-get install -y python3-pip | ||
pip3 install pyyaml | ||
|
||
# Build Graylog | ||
docker build --build-arg VCS_REF="$(git rev-parse --short HEAD)" \ | ||
--build-arg GRAYLOG_VERSION="$(./release.py --get-graylog-version)" \ | ||
--build-arg BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ | ||
--file docker/datanode/Dockerfile \ | ||
--tag $IMAGE_NAME . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters