soulbird commented on code in PR #7821:
URL: https://github.com/apache/apisix/pull/7821#discussion_r971422040


##########
.devcontainer/Dockerfile:
##########
@@ -0,0 +1,47 @@
+#
+# 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.
+#
+
+# See here for image contents: 
https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/debian/.devcontainer/base.Dockerfile
+
+# [Choice] Debian version (use bullseye on local arm64/Apple Silicon): 
bullseye, buster
+ARG VARIANT="buster"
+FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
+
+# Update user's uid based on sent variable
+# It seems it won't work on macos (with podman or rancher desktop) without this
+ARG USERNAME=vscode
+
+COPY .devcontainer/change-uid.sh /usr/local/bin/change-uid.sh
+RUN change-uid.sh
+
+# ** [Optional] Uncomment this section to install additional packages. **
+# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
+#     && apt-get -y install --no-install-recommends <your-package-list-here>
+RUN apt-get update && apt-get install cpanminus make luajit patch -y
+
+WORKDIR /build
+COPY utils ./utils
+RUN ./utils/install-dependencies.sh
+RUN luarocks install luacheck
+
+RUN mkdir /workspaces && chown vscode: /workspaces
+WORKDIR /workspaces
+USER vscode
+
+RUN mkdir -p /home/vscode/.ssh && ssh-keyscan github.com > 
/home/vscode/.ssh/known_hosts
+RUN git clone https://github.com/openresty/test-nginx && sudo cpanm 
./test-nginx

Review Comment:
   ```shell
   #0 72.73 Building and testing HTTP-Daemon-6.14 ... OK
   #0 77.57 Successfully installed HTTP-Daemon-6.14
   #0 77.62 ! Installing the dependencies failed: Module 'Net::HTTP' is not 
installed
   #0 77.62 ! Bailing out the installation for libwww-perl-6.67.
   #0 77.71 ! Installing the dependencies failed: Module 'LWP::UserAgent' is 
not installed
   #0 77.71 ! Bailing out the installation for Test-Nginx-0.30.
   #0 77.71 18 distributions installed
   ------
   Dockerfile-with-features:32
   --------------------
     30 |     RUN mkdir -p /home/vscode/.ssh && ssh-keyscan github.com > 
/home/vscode/.ssh/known_hosts
     31 |     #RUN sudo cpanm --notest Test::Nginx IPC::Run
     32 | >>> RUN git clone https://github.com/openresty/test-nginx && sudo 
cpanm ./test-nginx
     33 |     ENV PATH=$PATH:/usr/local/openresty/nginx/sbin
     34 |     
   --------------------
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to