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 2021/02/19 01:54:40 UTC

[GitHub] [apisix-docker] Firstsawyou opened a new issue #132: request help:failed to build image from source

Firstsawyou opened a new issue #132:
URL: https://github.com/apache/apisix-docker/issues/132


   1、clone source
   
   ```shell
   git clone https://github.com/apache/apisix-docker.git
   ```
   
   2、Build Image
   
   build alpine failed:
   
   ```shell
   $ cd apisix-docker
   $ export APISIX_VERSION=2.3
   $ docker build -t apisix:${APISIX_VERSION}-alpine --build-arg APISIX_VERSION=${APISIX_VERSION} -f alpine/Dockerfile alpine
   Sending build context to Docker daemon 6.656 kB
   Step 1/17 : ARG ENABLE_PROXY=false
   Please provide a source image with `from` prior to commit
   ```
   I don't know what caused this problem.
   


----------------------------------------------------------------
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



[GitHub] [apisix-docker] starsz closed issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
starsz closed issue #132:
URL: https://github.com/apache/apisix-docker/issues/132


   


----------------------------------------------------------------
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



[GitHub] [apisix-docker] Firstsawyou commented on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782095816


   > It is strange, Please show me the Dockerfile in alpine.
   
   The Dockerfile in alpine:
   
   ```
   $ cat alpine/Dockerfile 
   ARG ENABLE_PROXY=false
   
   FROM openresty/openresty:alpine-fat AS production-stage
   
   ARG APISIX_VERSION=2.3
   LABEL apisix_version="${APISIX_VERSION}"
   
   ARG ENABLE_PROXY
   RUN set -x \
       && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
       && apk add --no-cache --virtual .builddeps \
       automake \
       autoconf \
       libtool \
       pkgconfig \
       cmake \
       git \
       && mkdir ~/.luarocks \
       && luarocks config variables.OPENSSL_LIBDIR /usr/local/openresty/openssl/lib \
       && luarocks config variables.OPENSSL_INCDIR /usr/local/openresty/openssl/include \
       && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps \
       && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
       && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
       && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
       && apk del .builddeps build-base make unzip
   
   FROM alpine:3.11 AS last-stage
   
   ARG ENABLE_PROXY
   # add runtime for Apache APISIX
   RUN set -x \
       && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
       && apk add --no-cache bash libstdc++ curl
   
   WORKDIR /usr/local/apisix
   
   COPY --from=production-stage /usr/local/openresty/ /usr/local/openresty/
   COPY --from=production-stage /usr/local/apisix/ /usr/local/apisix/
   COPY --from=production-stage /usr/bin/apisix /usr/bin/apisix
   
   ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
   
   EXPOSE 9080 9443
   
   CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
   
   STOPSIGNAL SIGQUIT
   ```


----------------------------------------------------------------
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



[GitHub] [apisix-docker] Firstsawyou edited a comment on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
Firstsawyou edited a comment on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782094635


   > And show me the docker version
   
   docker version:
   
   ```
   $ docker version
   Client:
    Version:         1.13.1
    API version:     1.26
    Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
    Go version:      go1.10.3
    Git commit:      0be3e21/1.13.1
    Built:           Thu Nov 12 15:11:46 2020
    OS/Arch:         linux/amd64
   
   Server:
    Version:         1.13.1
    API version:     1.26 (minimum version 1.12)
    Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
    Go version:      go1.10.3
    Git commit:      0be3e21/1.13.1
    Built:           Thu Nov 12 15:11:46 2020
    OS/Arch:         linux/amd64
    Experimental:    false
   ```


----------------------------------------------------------------
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



[GitHub] [apisix-docker] Firstsawyou commented on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782093873


   > And show me the docker version
   
   docker version:
   
   ```
   docker version
   Client:
    Version:         1.13.1
    API version:     1.26
    Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
    Go version:      go1.10.3
    Git commit:      0be3e21/1.13.1
    Built:           Thu Nov 12 15:11:46 2020
    OS/Arch:         linux/amd64
   
   Server:
    Version:         1.13.1
    API version:     1.26 (minimum version 1.12)
    Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
    Go version:      go1.10.3
    Git commit:      0be3e21/1.13.1
    Built:           Thu Nov 12 15:11:46 2020
    OS/Arch:         linux/amd64
    Experimental:    false
   ```


----------------------------------------------------------------
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



[GitHub] [apisix-docker] Firstsawyou removed a comment on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
Firstsawyou removed a comment on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782093873


   > And show me the docker version
   
   docker version:
   
   ```
   docker version
   Client:
    Version:         1.13.1
    API version:     1.26
    Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
    Go version:      go1.10.3
    Git commit:      0be3e21/1.13.1
    Built:           Thu Nov 12 15:11:46 2020
    OS/Arch:         linux/amd64
   
   Server:
    Version:         1.13.1
    API version:     1.26 (minimum version 1.12)
    Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
    Go version:      go1.10.3
    Git commit:      0be3e21/1.13.1
    Built:           Thu Nov 12 15:11:46 2020
    OS/Arch:         linux/amd64
    Experimental:    false
   ```


----------------------------------------------------------------
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



[GitHub] [apisix-docker] gxthrj commented on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782062287


   It is strange, Please show me the Dockerfile in alpine.


----------------------------------------------------------------
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



[GitHub] [apisix-docker] tokers commented on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782517227


   @Firstsawyou Good point, PR's are welcome.


----------------------------------------------------------------
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



[GitHub] [apisix-docker] gxthrj commented on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782107822


   Your docker is too old,  need to update your docker first.
   
   The dockerfile allow ARG in FROM is from docker 17.05.0-ce.


----------------------------------------------------------------
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



[GitHub] [apisix-docker] Firstsawyou commented on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782238636


   > Your docker is too old, need to update your docker first.
   > 
   > The dockerfile allow ARG in FROM is from docker 17.05.0-ce.
   
   Thank you very much. After updating the docker version, the problem has been solved.
   
   If the docker version is too old, the build will fail. I think it should be explained in the README.md file of `alpine`, what do you think?


----------------------------------------------------------------
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



[GitHub] [apisix-docker] gxthrj commented on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782062492


   And show me the docker version


----------------------------------------------------------------
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



[GitHub] [apisix-docker] Firstsawyou commented on issue #132: request help:failed to build image from source

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #132:
URL: https://github.com/apache/apisix-docker/issues/132#issuecomment-782094635


   > And show me the docker version
   
   docker version:
   
   ```
   docker version
   Client:
    Version:         1.13.1
    API version:     1.26
    Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
    Go version:      go1.10.3
    Git commit:      0be3e21/1.13.1
    Built:           Thu Nov 12 15:11:46 2020
    OS/Arch:         linux/amd64
   
   Server:
    Version:         1.13.1
    API version:     1.26 (minimum version 1.12)
    Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
    Go version:      go1.10.3
    Git commit:      0be3e21/1.13.1
    Built:           Thu Nov 12 15:11:46 2020
    OS/Arch:         linux/amd64
    Experimental:    false
   ```


----------------------------------------------------------------
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