This project have used google cloud builder since 2 month ago. However the build is fail since yesterday.
The error point is COPY . /code/. It's get this error.
COPY . /code/
error building image: error building stage: failed to execute command: lstat /Users: no such file or directory
ERROR
ERROR: build step 0 "gcr.io/kaniko-project/executor:latest" failed: step exited with non-zero status: 1
--------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.builds.submit) build ab3ff4e4-85fb-4000-870e-86f34c0bf8ac completed with status "FAILURE"
Dockerfile is below
# Copyright 2013 Thatcher Peskens
#
# Licensed 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 python:3
MAINTAINER Dockerfiles
# timezone setting
RUN DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y tzdata
# timezone setting
ENV TZ=Asia/Tokyo
# Install required packages and remove the apt packages cache when done.
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
vim \
python3 \
python3-dev \
python3-setuptools \
python3-pip \
libssl-dev \
nginx \
supervisor \
cron \
&& \
rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
RUN pip3 install -U pip setuptools
# encode setting
# set the locale
RUN apt-get clean && apt-get update && apt-get install -y locales
# encode and locale settings
ENV LANG ja_JP.utf8
ENV TZ=Asia/Tokyo
#don't show error message
ENV DEBCONF_NOWARNINGS yes
# install uwsgi now because it takes a little while
RUN pip3 install uwsgi
RUN PYTHONPATH=/usr/bin/python3
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY nginx-app.conf /etc/nginx/sites-available/default
COPY supervisor-app.conf /etc/supervisor/conf.d/
COPY cron/crontab /var/spool/cron/crontabs/root
# COPY requirements.txt and RUN pip install BEFORE adding the rest of your code, this will cause Docker's caching mechanism
# to prevent re-installing (all your) dependencies when you made a change a line or two in your app.
COPY app/requirements.txt /code/app/
RUN pip3 install -r /code/app/requirements.txt
# add (the rest of) our code
COPY . /code/
RUN chmod 0744 /code/cron/*
RUN crontab /code/cron/crontab
ENV PYTHONPATH /usr/bin/python3
# install django, normally you would remove this step because your project would already
# be installed in the code/app/ directory
#RUN django-admin.py startproject website /code/app/
# this line do collectstatic and migrate
#RUN cd /code/app && /usr/bin/python3 manage.py collectstatic --no-input;/usr/bin/python3 manage.py migrate;
EXPOSE 8080
CMD ["supervisord", "-n"]
I build by this command.
cd ~/path/to/project/
gcloud builds submit --tag gcr.io/my/project .
What I did
COPY . /code/move to afterFROM python:3COPY . /code/change toCOPY . /code/COPY . /code/change toCOPY ./ /code/COPY . /code/change toCOPY ./* /code/COPY . /code/change toADD . /code/
Everything got same error at the line.
When I build at local docker build -t my_project ., it was completed.
Environment
- gloculd core: [2020.02.28] beta: [2019.05.17]
- macOS 10.14.6
If you have any solution, please help me!

gcloud builds submit --tag gcr.io/my/project .?.gitignoreor a.gcloudignorefile? If so, can you share their content?gcloud builds submit --tag gcr.io/my/project. It has same error. Sorry I can't share my content.