Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck in cloning template when vapor new a project in a Linux Docker container #461

Open
ElectronFang opened this issue Jun 3, 2024 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ElectronFang
Copy link

ElectronFang commented Jun 3, 2024

Describe the issue

I try to create a new Vapor project in a Linux Docker container, but stuck in cloning template

Vapor version

I think it should be a newest version, I can't new a project, so I can't find the package file.

Operating system and version

Ubuntu 22.04.4 LTS

Swift version

swift 5.10

Steps to reproduce

  1. Pull the latest swift image in Docker
  2. Install vapor
  3. Use the command vapor new
    截屏2024-06-03 17 17 13 (2)

Outcome

No response

Additional notes

No response

@ElectronFang ElectronFang added the bug Something isn't working label Jun 3, 2024
@0xTim
Copy link
Member

0xTim commented Jun 4, 2024

Is this still happening? Does cloning https://github.com/vapor/template manually work for you?

I'm unable to reproduce

@ElectronFang
Copy link
Author

ElectronFang commented Jun 5, 2024

Hi Tim,

Thanks for your reply, I am a beginner, and sorry to take your time.

  1. I can git clone a template, but vapor --template has same issue.
    I found out that I don't need to use the command vapor new to create a project, I can manually modify the template to my project.
    But I still feel weird, worry something will go wrong when I don't follow the official tutorial.

  2. I use this image as my container
    https://github.com/apple/swift-docker/blob/ea035798755cce4ec41e0c6dbdd320904cef0421/5.10/ubuntu/22.04/Dockerfile

is there something with the container?

@0xTim
Copy link
Member

0xTim commented Jun 5, 2024

Oh right I missed that you're running inside a Docker container. Yeah it could be because it's missing curl or another package, though it is just using git clone under the hood. I would say that it's not particularly designed for running in containers, it's more designed for where you do development.

I can reproduce this though, haven't tried to debug it

@0xTim 0xTim added the help wanted Extra attention is needed label Jun 5, 2024
@ElectronFang
Copy link
Author

Thanks Tim,

To provide more information for you, I tried last year when I know Vapor, 'vapor new' works in Linux Container, I thought it's my fault and tried a lot of times.

I also tried use Dev Container Extension of VScode to add a swift container with Vapor, but it also failed and stuck in the process of installing vapor.

Hope it helps and thanks for all of your hardwork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants