docker-build

Unspecified error (0x80004005) while running a Docker build

我的梦境 提交于 2020-02-24 07:55:12
问题 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 --->

Git clone verbose output?

人盡茶涼 提交于 2020-02-19 07:19:27
问题 I have to clone a couple of big repos in my Dockerfile. It really can take an hour to clone a single repo and I want to see standard Git progress output to understand what's going on. However, when Git is started from the Dockerfile, I see no git clone output whatsoever. The only thing printed to console is: Cloning into '/root/lib/opencv'... POST git-upload-pack (gzip 2052 to 1062 bytes) and then just a silence. While, usually, I expect something like this: Cloning into 'opencv'... POST git

Newer version of Docker gives permission errors during build

怎甘沉沦 提交于 2020-01-06 07:53:28
问题 I've created a Dockerfile to install IBM Rational Rhapsody on a 32bit Ubuntu image, which builds correctly with Docker 18.03.0-ce on Windows 7 but fails with Docker 18.09.2 on a Linux Mint 19 VM (Ubuntu Bionic repos). IBM's Java-based installer throws a permissions issue, and the Docker changelogs didn't show any obvious reasons for this. The Dockerfile up to the failing command is as follows: FROM i386/ubuntu:xenial-20181005 AS installation ARG DEBIAN_FRONTEND=noninteractive RUN apt-get

Dummy downsize after Docker build

我们两清 提交于 2020-01-01 09:48:42
问题 Using multi-stage builds, I want to downsize an image at the end of Dockerfile, something like this: FROM ubuntu AS ubuntu_build RUN # do a lot of build things FROM alpine COPY --from=ubuntu_build /app /app ENTRYPOINT whatever the alpine image is small, and in theory only the /app stuff will get copied from the ubuntu image, is this the best trick in the book, or is there some other way to minimize the size of the final image? 回答1: Distroless Google provides instructions and tools to help

Rebuild same docker image with only the additional changes in the Dockerfile

一曲冷凌霜 提交于 2019-12-25 06:28:04
问题 I build an docker image using a Dockerfile. After building the image, I made some basic changes on the Dockerfile. Is it possible to rebuild the same image with just the additional changes. Since, it takes very long time to create the image, I don't want to build it completely. Thanks in advance. 回答1: All docker build work in the way, that you describe. The only thing need to be taken into account is layer dependencies. Consider Dockerfile FROM something RUN cmd1 RUN cmd2 RUN cmd3 RUN cmd4 If

How to set system-wide environment variables in dockerfile from a file inside the docker container?

筅森魡賤 提交于 2019-12-23 17:10:52
问题 I am setting up a cross-compile environment as a docker container. During the build process I install a SDK for an embedded device: ADD sdk.tar /opt WORKDIR /opt/ RUN sdkinstall.sh which installs the sdk in a folder /opt/sdk/ Now I have a file /opt/sdk/envsetup that contains some environment variables: export SDKTARGETSYSROOT=/opt/sdk/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi export PATH=/opt/sdk/sysroots/x86_64-gadsdk-linux/usr/bin:/opt/sdk/sysroots/x86_64-gadsdk-linux/usr/bin/arm-gad

Docker compose doesn't recognize 'env_file'

馋奶兔 提交于 2019-12-23 15:25:20
问题 I am trying to run docker-compose up with the following configuration: php: image: php:7.0-fpm expose: - 9000 links: - nginx nginx: env_file: .env image: nginx:latest ports: - 80:80 - 433:433 environment: - NGINX_HOST: ${APP_URL} mysql: env_file: .env image: mysql:latest ports: - 3306:3306 environment: - MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} - MYSQL_DATABASE: ${DB_DATABASE} - MYSQL_USER: ${DB_USERNAME} - MYSQL_PASSWORD: ${DB_PASSWORD} - MYSQL_ALLOW_EMPTY_PASSWORD: no I have an .env file in the

Docker build command with --tag unable to tag images

时光总嘲笑我的痴心妄想 提交于 2019-12-21 07:09:05
问题 I have trying to build a Docker image using a Dockerfile available locally. docker build -t newimage . I have used this command multiple times earlier too, but somehow its not working currently and i am stuck finding the reason for it. I will be really helpful if someone can help me with a possible solution or a possible area to look for an issue. i already had a look over other posts that could have been related for example : Docker build tag repository name 回答1: Okay! I found out the reason

Is it possible to set a MAC address for `docker build`?

懵懂的女人 提交于 2019-12-21 04:28:38
问题 With docker run , it’s possible to fix the MAC address with the --mac-address option. I’ve looked, and I can’t find a way to fix the MAC address with docker build . I am wanting to dockerize software that has a license fixed to a MAC address (I’m not trying to get around the license; I’m trying to have a more reproducible system architecture). Thanks! 回答1: Let's consider the below Dockerfile FROM alpine RUN ifconfig | grep -i hwaddr If you build it using docker build . You get Sending build

Docker build from Dockerfile with more memory

纵然是瞬间 提交于 2019-12-20 12:37:19
问题 How to docker build from Dockerfile with more memory? This is a different question from this Allow more memory when docker build a Dockerfile When installing the software natively, there is enough memory to successfully build and install the marian tool But when building the Docker image using the Dockerfile https://github.com/marian-nmt/marian/blob/master/scripts/docker/Dockerfile.cpu , it fails with multiple memory exhausted errors virtual memory exhausted: Cannot allocate memory [out]: