简体   繁体   English

repo的自动构建文件位于何处

[英]where are repo's automated build files located

On an automated build, how can I access the files from my private repo? 在自动构建中,如何从私有存储库访问文件?

Ex if I have a Dockerfile with: 例如,如果我有一个Dockerfile:

FROM node:4.1.1
npm install

Where are the files from my repo located? 我的仓库中的文件位于何处?

If your Dockerfile has only: 如果您的Dockerfile只有:

FROM node:4.1.1
npm install

That won't involve any git repo (public or private) 这不会涉及任何git仓库(公共或私人)

You could add a RUN git clone git@bitbucket:myaccount/myprivaterepo /path/to/repo directive. 你可以添加一个RUN git clone git@bitbucket:myaccount/myprivaterepo /path/to/repo指令。

Or you can follow the official docker node image instruction : 或者您可以按照官方docker节点图像说明

Create a Dockerfile in your Node.js app project 在Node.js应用程序项目中创建一个Dockerfile

FROM node:0.10-onbuild
# replace this with your application's default port
EXPOSE 8888

You can then build and run the Docker image: 然后,您可以构建并运行Docker镜像:

$ docker build -t my-nodejs-app .
$ docker run -it --rm --name my-running-app my-nodejs-app

In that case, your node app will be in /usr/src/app . 在这种情况下,您的节点应用程序将位于/usr/src/app
See onbuild/Dockerfile : 请参阅onbuild/Dockerfile

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ONBUILD COPY package.json /usr/src/app/
ONBUILD RUN npm install
ONBUILD COPY . /usr/src/app

The image assumes that your application has a file named package.json listing its dependencies and defining its start script . 该映像假定您的应用程序有一个名为package.json的文件,列出其依赖关系并定义其启动脚本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Docker 源代码位于何处 (github repo)? - Where is the Docker source code located (github repo)? 从私有bitbucket存储库自动构建Docker:无法克隆存储库 - Docker automated build from private bitbucket repo: Failed to clone repository Docker hub 自动构建依赖于另一个 docker hub repo - Docker hub automated build depend on another docker hub repo 触发自动化Docker Hub构建于另一个公共GitHub repo更改 - Trigger automated Docker Hub build on another public GitHub repo change docker hub images标签未使用github组织仓库的自动构建显示 - docker hub images tags are not showing using automated build from github organisation repo dockerhub自动构建从单个repo与单个dockerfile构建多个图像 - dockerhub automated build from single repo with single dockerfile building multiple images 如果我使用Docker自动构建,我的私有github回购代码会公开吗? - Will my private github repo code become public if I use Docker automated build? 日志文件位于Graylog服务器Docker容器中的什么位置? - Where are the log files located in the Graylog server Docker container? 无法安装 Python package 位于 docker 构建的私有 Nexus 存储库中 - Can't install Python package located in private Nexus repo on docker build 在带有bitbucket存储库的docker hub上进行自动构建时,我是否仍需要在dockerfile中包含“ git pull”指令? - When doing an automated build on docker hub--with bitbucket repo--do I still need to include a “git pull” instruction in the dockerfile?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM