Questions tagged [docker-multi-stage-build]

221 questions
0
votes
0 answers

Building a Docker Image using Custom Base Image

Working on a Python Project where I need to separate out a child component from a parent component. The child component must use the parent component docker image as a base image and built its image upon it. Both of them uses wheel files for…
0
votes
1 answer

Combining multiple docker images with multistage build not working

I would like to create a Docker container image that has FFMPEG and NodeJs installed. I am trying a multistage build Dockerfile as follows using the jrottenberg/ffmpeg and node:12 Docker images: FROM jrottenberg/ffmpeg AS base FROM node:12 as…
vvg
  • 1,010
  • 7
  • 25
0
votes
0 answers

Making target argument mandatory with docker multi-stage build?

We're containerising our build pipeline with docker in a CI environment. We have a setup with multi-stage build, with the included (simplified) Dockerfile. The idea is to, depending on the trigger (branch type), run docker build with the relevant…
0
votes
1 answer

Docker multistage doesn't call entrypoint

I have a grails app running in Docker, and I was trying to add the Apache Derby server to run in the same image using Docker multi stage. But when I add Derby, then the grails app doesn't run. So I started with this: $ cat…
xpusostomos
  • 1,309
  • 11
  • 15
0
votes
1 answer

Running multi-stacker docker built docker image fails – Nexts cannot find react module

I'm building a multi-stage docker image for a project that uses nextjs and preact within a lerna monorepo. The multi-stage build succeeds, however, when I want to run the image, nextjs throws an error that 'react' cannot be found. The Dockerfile for…
bhr
  • 2,279
  • 1
  • 23
  • 31
0
votes
1 answer

Environment variable not injected into multi stage docker build on Azure Devops pipeline

I have a docker file that I can build locally without issues, on Azure Devops the variable is not set properly. E.g. locally I can run a multi-stage docker build where artifacts are fetched from an Azure artifact repository with authorization. The…
0
votes
2 answers

Docker golang busybox "no such file or directory" error

I'm building a multistage Docker image of a golang microservice and I want to make it very thin using busybox as base image to run the final executable. The image is correctly built, but when I run it I get this error: standard_init_linux.go:211:…
0
votes
2 answers

Why does docker-compose build run my steps twice?

I'm using multi-stage building with a Dockerfile like this: ##################################### ## Build the client ##################################### FROM node:12.19.0 as web-client-builder WORKDIR /workspace COPY web-client/package*.json…
0
votes
0 answers

Docker multistage - Args not persist if base images are different

I'm tryiing to create a image using multistage and it is not working as I'm expecting. Consider this docker file: FROM microsoft/iis:nanoserver ARG A RUN echo %A% FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8 ARG A RUN echo %A% World The…
0
votes
1 answer

How to copy from one image to another in a docker multistaged build?

I want to copy the vendor folder from the composer image to another php image during a multistaged build. My Dockerfile looks like this: FROM composer WORKDIR /tmp/composer-vendors/ COPY composer.lock composer.json ./ RUN composer install…
k0pernikus
  • 60,309
  • 67
  • 216
  • 347
0
votes
2 answers

Can we have a multi-stage Dockerfile where images under FROM could pertain to different linux OS distribution

Is it possible to use a multi-stage Dockerfile where the first base image pertains to Ubuntu, then the second one pertains to Alpine. I know that the end image resulting from the build using this Dockerfile cannot be executed on an Ubuntu platform…
Ashley
  • 1,447
  • 3
  • 26
  • 52
0
votes
2 answers

Using files from two Base images

I have two docker images. Image x just copies some files to the image, Image y copies other files and install some needed libs. I want to build third dockerfile=z that will be based on those two images. example for z: From x . . From y . . How do I…
0
votes
1 answer

MultiStage Docker Image

I have created a Multistage dockerfile. FROM dot-portal.de.pri.o2.com:8079/centos:centos7 as base # Install a basic SSH server GIT, UNZIP, LSOF and JDK 8 ADD myrepo.repo /etc/yum.repos.d/myrepo.repo RUN rm -rf /etc/yum.repos.d/CentOS* COPY…
user2439278
  • 1,222
  • 7
  • 41
  • 75
0
votes
1 answer

Pre warmed Java Docker image with class data sharing

I want to create a docker image that runs on a Java Service with OpenJ9's Class Data Sharing feature to improve startup performance. I want to create the Class Cache while building the image using a multi stage docker build. I saw a few mentions of…
0
votes
1 answer

Python3 and Docker multistage build file not found

I am noob to docker and i am trying to build a multistage dockerfile for python3 FROM ubuntu:18.04 as base RUN apt-get -qy update && apt-get install python3 -y WORKDIR /pydocktest COPY test.py . FROM ubuntu:18.04 AS release WORKDIR /pytest COPY…
zewOlF
  • 403
  • 3
  • 8
  • 13