You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apisix.apache.org by kv...@apache.org on 2020/12/18 06:22:34 UTC

[apisix-ingress-docker] branch main created (now 070e11d)

This is an automated email from the ASF dual-hosted git repository.

kvn pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-docker.git.


      at 070e11d  add dockerfile & readme

This branch includes the following new commits:

     new 070e11d  add dockerfile & readme

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[apisix-ingress-docker] 01/01: add dockerfile & readme

Posted by kv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kvn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-docker.git

commit 070e11de8128718120d4a87f1e43ab9a67022af0
Author: kv <gx...@163.com>
AuthorDate: Fri Dec 18 14:20:54 2020 +0800

    add dockerfile & readme
---
 Dockerfile | 42 ++++++++++++++++++++++++++++++++++++++++++
 README.MD  | 12 ++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..1afb4fc
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,42 @@
+#
+# 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.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+FROM golang:1.13.8 AS build-env
+
+ARG INGRESS_VERSION=0.1.0
+LABEL ingress_version="${INGRESS_VERSION}"
+RUN rm -rf /etc/localtime \
+    && ln -s /usr/share/zoneinfo/Hongkong /etc/localtime \
+    && dpkg-reconfigure -f noninteractive tzdata
+
+WORKDIR /build
+RUN wget https://github.com/apache/apisix-ingress-controller/archive/${INGRESS_VERSION}.tar.gz \
+    && tar zxvf apisix-ingress-controller-${INGRESS_VERSION}.tar.gz \
+    && ln -s apisix-ingress-controller-${INGRESS_VERSION} controller \
+    && cd ./controller \
+    && GOPROXY=https://goproxy.io,direct make build
+
+FROM alpine:3.12.1
+
+WORKDIR /ingress-apisix
+RUN apk add --no-cache ca-certificates libc6-compat \
+    && update-ca-certificates \
+    && echo "hosts: files dns" > /etc/nsswitch.conf
+
+COPY --from=build-env /build/controller/apisix-ingress-controller .
+COPY --from=build-env /usr/share/zoneinfo/Hongkong /etc/localtime
+
+ENTRYPOINT ["/ingress-apisix/apisix-ingress-controller", "ingress", "--config-path", "/ingress-apisix/config.yaml"]
diff --git a/README.MD b/README.MD
new file mode 100644
index 0000000..cea73a9
--- /dev/null
+++ b/README.MD
@@ -0,0 +1,12 @@
+**Docker images are not official ASF releases but provided for convenience. Recommended usage is always to build the source.**
+
+## How to build
+
+```
+export INGRESS_VERSION=0.1.0
+$ docker build -t apisix-ingress-controller:${INGRESS_VERSION} --build-arg APISIX_VERSION=${APISIX_VERSION} .
+```
+
+## How to deploy 
+
+Ref to [Apache apisix-ingress-controller](https://github.com/apache/apisix-ingress-controller/blob/master/docs/install.md)