如何使用node.js应用程序设置docker? [英] How do I set up docker with a node.js application?
本文介绍了如何使用node.js应用程序设置docker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Google App Engine上运行pupeteer,我需要将应用程序放在docker容器中才能使用chrome。我的问题是如何使用node.js应用程序设置docker?
我尝试过:
阅读没有帮助的文档
I am trying to run pupeteer on Google App Engine and I need to have the app in a docker container in order to have chrome available. My question is how do you set up docker with a node.js application?
What I have tried:
Read the docs which didn't help
推荐答案
我假设您在询问如何托管node.js应用程序在Docker容器中...
这两篇文章似乎是相对容易使用的解释,在Docker容器中托管你的节点应用程序: 将NodeJs应用程序部署到Docker容器 - Dean Slama Jr - 中等 [ ^ ])和( Dockerizing Node.js Web应用程序|节点。 js [ ^ ])。
如果您不熟悉Dockerfiles,那么我认为您应该首先使用Docker hello world在目标平台上工作(https://hub.docker.com/_/hello-world/ [ ^ ])。
I assume that you are asking about how to host a node.js application in a Docker container...
These 2 articles seem like relatively-easy-to-use explanations of hosting your node application(s) in a Docker container: (Deploy That NodeJs App to a Docker Container – Dean Slama Jr – Medium[^]) and (Dockerizing a Node.js web app | Node.js[^]).
If you are not familiar with Dockerfiles, then I think you should work through the Docker hello world working on your target platform first (https://hub.docker.com/_/hello-world/[^]).
这篇关于如何使用node.js应用程序设置docker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文