Azure-Samples / Azure-Samples/containerapps-albumapi-javascript

file not found in build context or excluded by .dockerignore: stat package.json: file does not exist

Aberta
#3 9 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
5
Forks
159
Merge médio
3d 16h
PRs com merge (30d)
1

Descrição

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behaviour that used to work and stopped in a new release)
```

### Minimal steps to reproduce

Container images are stored inside container registries. You can easily create a container registry and upload an image of your app to it in a single workflow using Visual Studio Code.

![Screenshot from 2022-06-05 17-29-27](https://user-images.githubusercontent.com/4691768/172069537-078546c1-db63-4d61-9fcc-29ee77975d62.png)

See it here: [Tutorial: Deploy to Azure Container Apps using Visual Studio Code](https://docs.microsoft.com/en-us/azure/container-apps/deploy-visual-studio-code#create-the-container-registry-and-docker-image)

### Any log messages given by the failure

```bash
Step 4/10 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
COPY failed: file not found in build context or excluded by .dockerignore: stat package.json: file does not exist
2022/06/05 20:24:24 Container failed during run: build. No retries remaining.
failed to run step ID: build: exit status 1
```

### Expected/desired behavior
Create the container registry and Docker image.

Once the registry is created and the image is built successfully, you are ready to create the container app to host the published image.

### OS and Version?

Linux debian 5.17.0-1-amd64 #1 SMP PREEMPT Debian 5.17.3-1 (2022-04-18) x86_64 GNU/Linux

### Versions

- code - version: 1.67.2
- Docker (extension) - version: 1.22.2
- Azure Container Apps (extension) - version: 0.1.1

### Mention any other details that might be useful

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelo tutorial vinculado do Azure Container Apps e inspecione o contexto de build, .dockerignore, package.json, package-lock.json e npm-shrinkwrap.json referenciados pela etapa COPY que está falhando. Reproduza o build documentado da imagem de contêiner e determine por que package.json não está disponível; considera-se concluído quando o registro e o build da imagem Docker forem bem-sucedidos.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
azure, docker, javascript, node.js
Domínio
build-system, cloud, devops
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.