You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/03 13:56:43 UTC

[GitHub] [apisix-dashboard] membphis commented on a change in pull request #657: feat: deploy with Docker

membphis commented on a change in pull request #657:
URL: https://github.com/apache/apisix-dashboard/pull/657#discussion_r515754035



##########
File path: Dockerfile
##########
@@ -0,0 +1,62 @@
+#
+# 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.14 as api-builder
+
+WORKDIR /go/src/app
+
+COPY ./api .
+
+RUN mkdir -p /go/output/conf \
+    && cp ./conf/*.json /go/output/conf
+
+RUN wget https://github.com/api7/dag-to-lua/archive/v1.1.tar.gz \
+    && tar -zxvf v1.1.tar.gz \
+    && mkdir -p /go/output/dag-to-lua \
+    && mv -u ./dag-to-lua-1.1/lib/* /go/output/dag-to-lua/
+
+RUN go build -o /go/output/manager-api .

Review comment:
       > ```shell
   > RUN go env -w GOPROXY=https://goproxy.io,direct 
   > ```
   
   this step should be optional. Is it only useful for Chinese developers?

##########
File path: Dockerfile
##########
@@ -0,0 +1,59 @@
+#
+# 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.14 as api-builder
+
+WORKDIR /go/src/app
+
+COPY ./api .
+
+RUN mkdir -p /go/output/conf \
+    && cp ./conf/*.json /go/output/conf
+
+RUN wget https://github.com/api7/dag-to-lua/archive/v1.1.tar.gz \
+    && tar -zxvf v1.1.tar.gz \
+    && mkdir -p /go/output/dag-to-lua \
+    && mv -u ./dag-to-lua-1.1/lib/* /go/output/dag-to-lua/
+
+RUN go env -w GO111MODULE=on \
+    && go env -w GOPROXY=https://goproxy.io,direct \
+    && go build -o /go/output/manager-api .

Review comment:
       @nic-chen you can help @juzhiyuan to do this directly, eg: modify the source code ^_^




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org