From c981bb6a3335b9e0c9990f3a78d76bb1f6dac123 Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Fri, 7 Apr 2023 07:55:36 -0700 Subject: [PATCH] Add pipeline and created entrypoint.sh for Dockerfile --- Dockerfile | 4 +++- pipeline/automated-build.yml | 22 ++++++++++++++++++++++ scripts/entrypoint.sh | 6 ++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pipeline/automated-build.yml create mode 100644 scripts/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index ae2a0b3..468b9ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,6 @@ RUN dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noar RUN dnf update -y && dnf upgrade -y RUN dnf install -y memcached RUN yum clean all -ENTRYPOINT [ " /usr/bin/memcached -u memcached -l 0.0.0.0" ] \ No newline at end of file +COPY ./scripts/entrypoint.sh / +RUN chmod +x /entrypoint.sh +ENTRYPOINT [ "/entrypoint.sh" ] \ No newline at end of file diff --git a/pipeline/automated-build.yml b/pipeline/automated-build.yml new file mode 100644 index 0000000..c4009da --- /dev/null +++ b/pipeline/automated-build.yml @@ -0,0 +1,22 @@ +--- +resources: +- name: cmc + type: git + source: + uri: https://repo.anhonesthost.net/cloud-hosting-platform/cloud-memcached-container.git + branch: trunk + +- name: build-cmc-latest + type: docker-image + source: + repository: registry.dnspegasus.net/cmc + tag: latest + +jobs: + - name: publish-cmc-latest + plan: + - get: cmc + trigger: true + - put: build-cmc-latest + params: + build: cmc \ No newline at end of file diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh new file mode 100644 index 0000000..b5fd512 --- /dev/null +++ b/scripts/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash +echo "Starting Memcached..." +sleep 5 +/usr/bin/memcached -u memcached -l 0.0.0.0 + +exit 0 \ No newline at end of file