You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2020/09/25 15:33:39 UTC
[yetus] branch main updated: YETUS-990. ENTRYPOINT for
apache/yetus:(tag) container images (#130)
This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/yetus.git
The following commit(s) were added to refs/heads/main by this push:
new ff7eafd YETUS-990. ENTRYPOINT for apache/yetus:(tag) container images (#130)
ff7eafd is described below
commit ff7eafd67cbeb0b80368aa90f0d823295516d585
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Fri Sep 25 08:33:33 2020 -0700
YETUS-990. ENTRYPOINT for apache/yetus:(tag) container images (#130)
---
Dockerfile | 3 +++
Dockerfile => entrypoint.sh | 25 ++++++++++---------------
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 0e417a1..56d9190 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,6 +19,9 @@ FROM ${DOCKER_REPO}-base:${DOCKER_TAG}
LABEL org.apache.yetus=""
COPY . /ysrc/
+COPY entrypoint.sh /entrypoint.sh
+RUN chmod a+rx /entrypoint.sh
+ENTRYPOINT ["/entrypoint.sh"]
# hadolint ignore=DL3003
RUN cd /ysrc \
diff --git a/Dockerfile b/entrypoint.sh
old mode 100644
new mode 100755
similarity index 67%
copy from Dockerfile
copy to entrypoint.sh
index 0e417a1..9ed32c4
--- a/Dockerfile
+++ b/entrypoint.sh
@@ -1,3 +1,5 @@
+#!/usr/bin/env bash
+
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
@@ -13,18 +15,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-ARG DOCKER_TAG=main
-ARG DOCKER_REPO=apache/yetus
-FROM ${DOCKER_REPO}-base:${DOCKER_TAG}
-
-LABEL org.apache.yetus=""
-COPY . /ysrc/
-
-# hadolint ignore=DL3003
-RUN cd /ysrc \
- && mvn clean install -DskipTests \
- && rm -rf /.m2 \
- && cd /usr \
- && tar xzpf /ysrc/yetus-dist/target/artifacts/apache-yetus*bin.tar.gz \
- --strip 1 \
- && rm -rf /ysrc /root/.m2
+# if passed a flag, assume test-patch
+# otherwise assume bash
+if [[ "${1:0:1}" = '-' ]]; then
+ set -- test-patch "$@"
+elif [[ -z "${1}" ]]; then
+ set -- bash "$@"
+fi
+exec "$@"
\ No newline at end of file