docker-compose

Docker compose missing yarn dependencies on build

匆匆过客 提交于 2019-12-05 20:20:34
Can't get node_modules folder when running yarn install in the Dockerfile test-sof ├── docker-compose.yml ├── Dockerfile ├── package.json └── yarn.lock docker-compose.yml version: '3' services: web: build: . volumes: - .:/myapp package.json { "name": "site", "private": true, "dependencies": { "@rails/webpacker": "^3.2.1", "babel-preset-react": "^6.24.1", "prop-types": "^15.6.0", "react": "^16.2.0", "react-dom": "^16.2.0", "reactjs": "^1.0.0", "underscore": "^1.8.3" }, "devDependencies": { "webpack-dev-server": "^2.11.1" } } Dockferfile FROM ruby:2.5 RUN curl -sL https://deb.nodesource.com

Docker Cannot start service as already exists

倖福魔咒の 提交于 2019-12-05 20:13:43
Running docker-compose up -d I got the following error: Starting cr-redis ... Starting cr-rabbitmq ... Starting cr-rabbitmq ... error Starting cr-redis ... error Starting cr-mysql ... error ERROR: for cr-mysql Cannot start service mysql: container "ff36...1116": already exists ERROR: for rabbitmq Cannot start service rabbitmq: container "3b6c...0aba": already exists ERROR: for redis Cannot start service redis: container "e84f...df91": already exists ERROR: for mysql Cannot start service mysql: container "ff36...1116": already exists ERROR: Encountered errors while bringing up the project.

harbor helm仓库使用

醉酒当歌 提交于 2019-12-05 20:07:36
harbor helm仓库使用 官方文档地址:https://github.com/goharbor/harbor Monocular 从1.0 开始专注于helm 的UI展示,对于部署以及维护已经去掉了,官方也提供了相关的说明以及推荐了几个可选的部署工具,从使用以及架构上来说kubeapps 就是Monocular + helm 操作的集合,比Monocular早期版本有好多提升 安装 下载离线安装包 wget https://github.com/goharbor/harbor/releases/download/v1.9.3/harbor-offline-installer-v1.9.3.tgz 配置harbor 主要是harbor.cfg文件 目前主要配置hostname和port ,使用自己服务器的ip,修改默认端口号 hostname: 192.168.75.100 http: # port for http, default is 80. If https enabled, this port will redirect to https port port: 10000 生成docker-compose file # 先安装docker-compose,地址:https://github.com/docker/compose/releases # 需要docker

Running composer install in docker container

一曲冷凌霜 提交于 2019-12-05 19:49:33
I have a docker-compose.yml script which looks like this: version: '2' services: php: build: ./docker/php volumes: - .:/var/www/website The DockerFile located in ./docker/php looks like this: FROM php:fpm RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" RUN mv composer.phar /usr/local/bin/composer RUN composer update -d /var/www/website Eventho this always fails with the error [RuntimeException] Invalid working directory specified, /var/www/website does not exist. When I remove the RUN composer

Docker Named Volume location Mac

天涯浪子 提交于 2019-12-05 19:41:20
I'm using Docker for Mac 1.12.1 and have a docker compose file which starts wordpress and mysql services Compose file version: '2' services: db: container_name: mysql_db image: mysql:5.7 volumes: - "./.data/db:/var/lib/mysql" restart: always environment: MYSQL_ROOT_PASSWORD: wordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: container_name: wordpress depends_on: - db image: wordpress:latest links: - db ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_PASSWORD: wordpress volumes: - wordpress/:/var/www/html/

离线手动部署docker镜像仓库——harbor仓库(一)

孤者浪人 提交于 2019-12-05 19:12:56
前言&需求: 部署docker的镜像仓库harbor仓库,如果是使用的rancher管理工具,可以直接在rancher的Catalog里面找到harbor仓库服务,填入相关的参数,一键部署即可。 但是本次部署的服务器,因为业务限制,不能连外网,不能使用catalog部署,就只能离线部署。本次记录的是离线部署harbor仓库的过程。 实验环境: harbor服务器系统:CentOS Linux release 7.4.1708 (Core) harbor服务器IP:10.0.0.101 harbor版本:v1.5.0 docker版本:1.13.1 另外为了测试pull镜像,使用了另一台test102机器:10.0.0.102 部署过程: 1、下载安装包 下载地址: http://harbor.orientsoft.cn/ 2、上传并解压安装包 将下载下来的安装包上传到服务器的/home目录,并解压。 [root@test101 home]# tar xf harbor-offline-installer-v1.5.0.tgz [root@test101 home]# ll 总用量 843504 drwxr-xr-x. 4 root root 229 7月 30 15:48 harbor -rw-r--r--. 1 root root 863747205 7月 30 15:39

Harbor镜像仓库漏洞扫描功能

℡╲_俬逩灬. 提交于 2019-12-05 19:12:51
镜像漏洞扫描功能简介 开源企业级镜像仓库 Harbor v1.2 新增了镜像漏洞扫描的功能,可以帮助用户发现容器镜像中的安全漏洞,及时采取防范措施。 容器镜像本质上是一系列静态文件的集合,也是容器应用运行的时候可见的文件系统。镜像扫描就是遍历所有镜像中的文件系统,逐个检查软件包(Package)是否包含安全漏洞。这个过程有点像我们电脑里面的扫病毒软件做的事情,把电脑的所有文件进行分析,和已知病毒数据库的病毒指纹特征做对比,从而发现病毒的踪迹。 在 Harbor 中,我们集成了开源项目 Clair 的扫描功能,可从公开的 CVE 字典库下载漏洞资料。CVE 是 Common Vulnerabilities and Exposures 的缩写,由一些机构自愿参与维护的软件安全漏洞标识,记录已知的漏洞标准描述及相关信息,公众可以免费获取和使用这些信息。全球共有77个机构参与维护不同软件的 CVE 库,例如:VMware 维护着 VMware 产品的 CVE 库,红帽维护着Linux 上的 CVE 等等。容器镜像基本上涉及的是 Linux 操作系统上的软件,因此镜像扫描需要参考 Linux 相关的 CVE 库,目前 Harbor(Clair)使用的CVE 源有: Debian Security Bug Tracker Ubuntu CVE Tracker RedHat Security

记不住git命令?试试这个命令浏览网站

こ雲淡風輕ζ 提交于 2019-12-05 19:05:57
Find the right git commands without digging through the web. 找 git 命令,无需谷歌百度,无需 git -help ,这个网站以图形界面的形式告诉你正确的 git 命令,以及这个命令需要注意的内容 网站地址 : https://gitexplorer.com/ 项目地址 : https://github.com/summitech/gitexplorer 介绍 页面顶部的 Normal type speed 和 Fast type speed 可以设置 git 命令 显示速度的快慢 通过右上角的 Light Mode 和 Dark Mode 设置网页 主题颜色 (亮色和暗色) Last year, we came across Sarah Drasner's array explorer . It is a really cool resource for anyone to easily figure out the best JS array method to use. We loved it and decided to build something similar for Git. 项目受到了 Github 上另一项目( 项目地址 : https://github.com/sdras/array

Passing Different Arguments When Running Docker Image Multiple Times

时间秒杀一切 提交于 2019-12-05 18:57:43
I need to give an argument while running Docker Image which will be a number from 0-3. Dockerfile has the following: WORKDIR "mydir/build" CMD ./maker oneapp > /artifacts/oneapp_$1.log ; ./maker twoapp > /artifacts/twoapp_$1.log ; ./maker -j13 threeapp > /artifacts/threeapp_$1.log I will be running the same Docker Image multiple times so I need logs to be saved in /artifacts appended with _0, _1, _2, _3, as appropriate. I tried keeping this in Docker file but don't want to pass this full line as argument while running docker. ENTRYPOINT ["/bin/bash"] ./maker oneapp > /artifacts/oneapp_$1.log ;

Docker Compose Nested Environment Variable

那年仲夏 提交于 2019-12-05 18:51:36
I have an existing app that uses a app config file that looks like: "ConnectionInfo": { "ServerName": "The Server URL", "DatabaseName": "The DatabaseName", "UserName": "The User Name", "Password": "The Password"} Now, when I have a simple setting, say "ConnectionString":"My Connection String" I understand how to override it in the compose.yml file: environment: - ConnectionString=what I want it to be The question is, how do you set, say, the server name in the top? Please use underscore (__) as the following instead of a colon (:). environment: - ConnectionInfo__ServerName=MyServerName Please