Docker

“Unable to locate package git” when running GitLab CI/CD pipeline

心不动则不痛 提交于 2021-02-19 05:25:32
问题 I am trying to set up a GitLab CI/CD pipeline with this following .gitlab-ci.yml file: stages: - test image: "ros:foxy-ros-base-focal" before_script: - apt-get -y update && apt-get install -y \ git wget qt5-default \ python3-osrf-pycommon \ python3-catkin-tools \ python3-rosdep \ python3-vcstool \ python3-pip \ python3-colcon-common-extensions \ apt-utils - rm -rf /var/lib/apt/lists/* - /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; colcon build" - echo "source /root/dev_ws/install

Jib-Maven-plugin with Jenkins scripted pipeline: how to log in to private docker registry?

家住魔仙堡 提交于 2021-02-19 05:20:29
问题 Regarding this problem, I updated my JHipster-Application with scripted Jenkins pipeline and have now in Jenkinsfile (partly following these hints): [...] def dockerImage withEnv(["DOCKER_CREDS=credentials('myregistry-login')"]) { stage('publish docker') { sh "./mvnw -X -ntp jib:build" } } with Jenkins global credentials myregistry-login saved in my Jenkins-Server to my own docker registry v2 docker-container https://myregistry.mydomain.com (domain changed for security reasons). I can

Centos7 使用 kubeadm 安装Kubernetes 1.13.3

懵懂的女人 提交于 2021-02-19 05:04:16
目录 [toc] 什么是Kubeadm?   大多数与 Kubernetes 的工程师,都应该会使用 kubeadm 。它是管理集群生命周期的重要工具,从创建到配置再到升级; kubeadm 处理现有硬件上的生产集群的引导,并以最佳实践方式配置核心 Kubernetes 组件,以便为新节点提供安全而简单的连接流程并支持轻松升级。   在 Kubernetes 的文档 Creating a single master cluster with kubeadm 中已经给出了目前kubeadm的主要特性已经处于 Beta 状态了,在 2018 年就会转换成正式发布 (GA) 状态态,说明 kubeadm 离可以在生产环境中使用的距离越来越近了。    什么是容器存储接口(CSI)?   容器存储接口最初于 1.9 版本中作为 alpha 测试功能引入,在 1.10 版本中进入 beta 测试,如今终于进入 GA 阶段正式普遍可用。在 CSI 的帮助下, Kubernetes 卷层将真正实现可扩展性。通过 CSI ,第三方存储供应商将可以直接编写可与 Kubernetes 互操作的代码,而无需触及任何 Kubernetes 核心代码。事实上,相关规范也已经同步进入 1.0 阶段。    什么是CoreDNS?   在1.11中,官方宣布 CoreDNS

PHP app cannot connect to docker mysql container at 127.0.0.1

橙三吉。 提交于 2021-02-19 04:18:39
问题 Mysql is in it's own docker-compose.yml as I want a mysql server up and running that any other php application can connect to. So I do not have php and mysql in the same docker-compose.yml. From the php application, I can connect to mysql if I use the mysql container's gateway ip address by looking it up and then hard coding it into the php application. docker inspect mysql-db . But docker will change that 172... ip address each time mysql restarts so that is not ideal for development. I can

How to dockerize dotnet core angular template application?

落花浮王杯 提交于 2021-02-19 04:01:27
问题 I created a web application using the dotnet cli angular template. dotnet new anguar Web Now I want to dockerize this application. I added the following Dockerfile to the project folder. FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env WORKDIR /app # Copy csproj and restore as distinct layers COPY *.csproj ./ RUN dotnet restore # Copy everything else and build COPY . ./ RUN dotnet publish -c Release -o out # Build runtime image FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 WORKDIR /app

Why is a folder created by WORKDIR owned by root instead of USER

五迷三道 提交于 2021-02-19 03:59:48
问题 I have the following Dockerfile ARG DEV_USER=dev # Other stuff ... USER $DEV_USER # Other stuff ... WORKDIR /home/$DEV_USER/Projects When I start a container and execute ls /home/dev , the Projects folder is owned by root . Does WORKDIR ignore the fact that USER was invoked earlier? 回答1: I failed to find detail documents for this, but I'm interested on this, so I just had a look for docker source code, I guess we can get the clue from sourcecode: moby/builder/dockerfile/dispatcher.go (Line

Jenkins Pipeline does not run with docker-compose because it cant connect to docker daemon

别来无恙 提交于 2021-02-19 03:19:36
问题 I am trying to build an docker image and start the container with docker-compose inside a Jenkins pipeline. I have a custom docker image for my Jenkins where I use the Jenkins out of the box image and install Docker CE and docker compose. The Dockerfile: FROM jenkins/jenkins:2.159 USER root # create dir to save jenkins log files RUN mkdir /var/log/jenkins RUN chown -R jenkins:jenkins /var/log/jenkins #############################################################################################

flyway unable to connect to postgres container within docker-entrypoint-initdb.d script

依然范特西╮ 提交于 2021-02-19 02:15:38
问题 I'm trying to extend the postgres Docker image to potentially (via an environment variable flag) execute flyway DB migrations on DB init. My Dockerfile is here: FROM postgres:9.6 # Install curl and java (for Flyway) RUN set -x \ && apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl openjdk-8-jre # Install Flyway ENV FLYWAY_VERSION 4.2.0 ENV FLYWAY_INSTALL_DIR /usr/src/flyway ENV FLYWAY_CONF ${FLYWAY_INSTALL_DIR}/flyway-${FLYWAY_VERSION}/conf/flyway.conf ENV

flyway unable to connect to postgres container within docker-entrypoint-initdb.d script

ε祈祈猫儿з 提交于 2021-02-19 02:14:43
问题 I'm trying to extend the postgres Docker image to potentially (via an environment variable flag) execute flyway DB migrations on DB init. My Dockerfile is here: FROM postgres:9.6 # Install curl and java (for Flyway) RUN set -x \ && apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl openjdk-8-jre # Install Flyway ENV FLYWAY_VERSION 4.2.0 ENV FLYWAY_INSTALL_DIR /usr/src/flyway ENV FLYWAY_CONF ${FLYWAY_INSTALL_DIR}/flyway-${FLYWAY_VERSION}/conf/flyway.conf ENV

flyway unable to connect to postgres container within docker-entrypoint-initdb.d script

江枫思渺然 提交于 2021-02-19 02:13:20
问题 I'm trying to extend the postgres Docker image to potentially (via an environment variable flag) execute flyway DB migrations on DB init. My Dockerfile is here: FROM postgres:9.6 # Install curl and java (for Flyway) RUN set -x \ && apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl openjdk-8-jre # Install Flyway ENV FLYWAY_VERSION 4.2.0 ENV FLYWAY_INSTALL_DIR /usr/src/flyway ENV FLYWAY_CONF ${FLYWAY_INSTALL_DIR}/flyway-${FLYWAY_VERSION}/conf/flyway.conf ENV