docker-build

--mount=type=cache in buildkit

自作多情 提交于 2021-02-18 06:57:12
问题 I'm trying to get maven offline builds working from within a docker container. I've enabled buildkit. I've run mvn dependency:go-offline -s ~/checkouts/settings.xml to cache the dependencies in /root/.m2 of host machine. I wish to use this inside the container that builds maven project. Here is my Dockerfile: #syntax=docker/dockerfile:experimental FROM maven:3.6.1-jdk-11 AS build WORKDIR / COPY . / RUN --mount=type=cache,target=/root/.m2 mvn -o install FROM scratch COPY --from=build /admin

How to cache docker-compose build inside github-action

你离开我真会死。 提交于 2021-02-16 02:58:08
问题 Is there any way to cache docker-compose so that it will not build again and again? here is my action workflow file: name: Github Action on: push: branches: - staging jobs: test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - name: Bootstrap app on Ubuntu uses: actions/setup-node@v1 with: node-version: '12' - name: Install global packages run: npm install -g yarn prisma - name: Install project deps if: steps.cache-yarn.outputs.cache-hit != 'true' run: yarn - name: Build docker

How to cache docker-compose build inside github-action

风流意气都作罢 提交于 2021-02-16 02:51:00
问题 Is there any way to cache docker-compose so that it will not build again and again? here is my action workflow file: name: Github Action on: push: branches: - staging jobs: test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - name: Bootstrap app on Ubuntu uses: actions/setup-node@v1 with: node-version: '12' - name: Install global packages run: npm install -g yarn prisma - name: Install project deps if: steps.cache-yarn.outputs.cache-hit != 'true' run: yarn - name: Build docker

How to cache docker-compose build inside github-action

不羁的心 提交于 2021-02-16 02:49:40
问题 Is there any way to cache docker-compose so that it will not build again and again? here is my action workflow file: name: Github Action on: push: branches: - staging jobs: test: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - name: Bootstrap app on Ubuntu uses: actions/setup-node@v1 with: node-version: '12' - name: Install global packages run: npm install -g yarn prisma - name: Install project deps if: steps.cache-yarn.outputs.cache-hit != 'true' run: yarn - name: Build docker

Mounting Maven Repository to Docker

∥☆過路亽.° 提交于 2021-01-21 09:32:34
问题 I am trying to build a Java application and make a package using docker. This builds needs a maven repository which I don't want to include in the image, since it's very large. I wanted to try using volumes and mount my local maven repository to the maven repository in the image. I used apt-get install -y maven in order to have maven available, but I can't find the directory .m2 in the image $HOME . I used ls -la $HOME , ls -la and ls -la /root to find the maven home, but there is no .m2

How to use label filter on intermediate containers that get created during build (assuming LABEL is set immediately after FROM command)?

耗尽温柔 提交于 2020-05-17 07:45:09
问题 In the dockerfile, suppose I set a LABEL immediately after the FROM command, then is the label applied to every intermediate container and image generated in the subsequent step? I know that intermediate containers get removed during build after each step. But I am facing an issue where-in some of the intermediate container are not getting removed. This is causing the images created out of these containers (during the build process) to become dangled. I can see the images in docker images and

Unspecified error (0x80004005) while running a Docker build

点点圈 提交于 2020-02-24 07:56:50
问题 Going thought the onboarding first steps of docker https://hub.docker.com/?overlay=onboarding , I run into an issue when running the build command docker build -t <user>/cheers2019 . The error happend at the 6th step, with code error (0x80004005). I am running docker on windows with windows containers. The full error code: Sending build context to Docker daemon 13.31kB Step 1/9 : FROM golang:1.11-alpine AS builder ---> e116d2efa2ab Step 2/9 : RUN apk add --no-cache git ---> Using cache --->

Unspecified error (0x80004005) while running a Docker build

瘦欲@ 提交于 2020-02-24 07:55:45
问题 Going thought the onboarding first steps of docker https://hub.docker.com/?overlay=onboarding , I run into an issue when running the build command docker build -t <user>/cheers2019 . The error happend at the 6th step, with code error (0x80004005). I am running docker on windows with windows containers. The full error code: Sending build context to Docker daemon 13.31kB Step 1/9 : FROM golang:1.11-alpine AS builder ---> e116d2efa2ab Step 2/9 : RUN apk add --no-cache git ---> Using cache --->