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

Unsuccessful docker deployment #91

Open
HaoGram opened this issue Jul 18, 2023 · 4 comments
Open

Unsuccessful docker deployment #91

HaoGram opened this issue Jul 18, 2023 · 4 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@HaoGram
Copy link

HaoGram commented Jul 18, 2023

信息

Deploying with docker, but can't access the page.
Do I need any other additional configurations?

docker buildx create --use --name=cross 
docker buildx build --load --platform=linux/amd64 . -t tov


docker run -itd --name tov-web -p 9999:8043 tov:latest

Then I visit the link http://localhost:9999 but it fails.

nodejs 版本

v18.16.1


包管理器及其版本

pnpm


系统

macos



bug

描述


预期结果

TODO


最小测试仓库

@markthree
Copy link
Member

markthree commented Jul 18, 2023

@HaoGram Hi,Your shell commands work perfectly on my computer, but I'm on windows 11.

docker buildx create --use --name=cross 
docker buildx build --load --platform=linux/amd64 . -t tov

docker run -itd --name tov-web -p 9999:8043 tov:latest

The dockerfile for the existing project doesn't require any other configuration files, I think it's the difference in commands on different systems, I'll test other simpler and more generic commands to get the project started in docker. If it works, I will support it in the README in the future.

@markthree markthree self-assigned this Jul 18, 2023
@markthree markthree added question Further information is requested optimal labels Jul 18, 2023
@markthree
Copy link
Member

@HaoGram
Hi, You can try deploying with the following command 👇

docker build --pull --rm -f "dockerfile" -t tov "." 

docker run --rm -d -p 9999:8043/tcp tov:latest 

It runs fine on my computer and doesn't require any other configuration,If it works on mac too, I'll log it in the README。

@HaoGram
Copy link
Author

HaoGram commented Jul 27, 2023

@HaoGram Hi, You can try deploying with the following command 👇

docker build --pull --rm -f "dockerfile" -t tov "." 

docker run --rm -d -p 9999:8043/tcp tov:latest 

It runs fine on my computer and doesn't require any other configuration,If it works on mac too, I'll log it in the README。

I have try this command. It's work on mac.

But it's work when i add 'buildx --platform=linux/amd64'.
My mac is 'Apple M1', so I need this parameter to be packaged into an image that can run within a linux environment, and I think most of our servers are linux environments. So I think this is important. But I don't have a linux environment right now to test if he is working properly.

@markthree
Copy link
Member

markthree commented Jul 27, 2023

I have try this command. It's work on mac.

But it's work when i add 'buildx --platform=linux/amd64'. My mac is 'Apple M1', so I need this parameter to be packaged into an image that can run within a linux environment, and I think most of our servers are linux environments. So I think this is important. But I don't have a linux environment right now to test if he is working properly.

I haven't tried this -platform=Linux/amd64 simulates running on other platform containers, which may be a difference on the system.

I think the container has smoothed out this difference, and we don't actually need to simulate Linux systems on our system unless it's a secondary development container.

One fact is that the same container configuration can run on the Zeabur service (Our team's private project), and the server behind it is a Linux system that has been running well so far, so you can rest assured.

However, I will keep the issue thread from being closed and wait for others to provide more support

@markthree markthree added help wanted Extra attention is needed and removed optimal labels Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants