Questions tagged [dockerfile]

For questions about Dockerfiles - text files containing instructions to build Docker container images.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

Conda environment in docker

I am new to dockerization and I am trying to make a docker image out of git repository. The Dockerfile looks like this, FROM continuumio/miniconda3:latest ENV PYTHONDONTWRITEBYTECODE=1 ENV ...
Shaz's user avatar
  • 101
0 votes
0 answers
15 views

ADD'ing a zip file during a docker build corrupts the ADD'ed file

I am trying to upload a Python .whl file (essentially a .zip file) while building a Dockerfile image: FROM python:3.12-slim-bookworm RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-...
rlandster's user avatar
  • 121
0 votes
1 answer
25 views

How to implement docker image update on edge device not connected to the Internet [closed]

We need to deploy docker container on edge devices which wont be having Internet. These device occasionally connect to network and one of the device (lets call it H) on the network will have internet ...
Mahesha999's user avatar
0 votes
0 answers
7 views

exporting Mikrotik as an OS

how can I export license "mikrotik" platform as a Docker image file? I boot a OVF file in Virtual machine and I need a command in router OS for build a docker image.
Ali Yadollahi's user avatar
0 votes
0 answers
14 views

How to package C++ application along with its all dependencies for deployment using docker

I have a C++ application which depends on several other third party projects which I clone and build from source. I wanted to now deploy this application as a docker container. Consider following ...
RajS's user avatar
  • 141
0 votes
0 answers
9 views

Dealing with challenges while deploying app through docker container on robot with limited Internet connectivity

I was almost convinced that app deployment on battery powered robots running ubuntu can be better done with docker instead of some non docker approach because of different reasons like atomic updates ...
RajS's user avatar
  • 141
0 votes
0 answers
38 views

Changing root password via DOCKERFILE

Nevermind the security implications, I'd like to change the root password via the DOCKERFILE. Is there a way to do this? I figured that the below line would work, however, it doesn't. RUN echo "...
Yaemish's user avatar
0 votes
0 answers
56 views

Base image can not be fetched within Dockerfile build but can be fetched from shell

Client: Docker Engine - Community Version: 24.0.6 OS: RHEL8 I want to build an existing docker compose project on a new VM. The docker compose project consists of two containers db and web. I have ...
Michael's user avatar
  • 69
0 votes
0 answers
25 views

How to add packages to the micro and mini suse base images

I want to install tar and zstd packages to the base image of registry.suse.com/bci/bci-minimal:15.5 and registry.suse.com/bci/bci-micro:15.5 (taken from https://registry.suse.com/) but none of the ...
Jagrut Trivedi's user avatar
0 votes
0 answers
10 views

Ensuring Ubuntu docker image will not kill the process under heavy load

We run our app as a daemon (or some times with nohup command) so that Ubuntu will not kill this process under heavy processor and memory load. However, we want to dockerize (on Ubuntu 20.04 docker ...
RajS's user avatar
  • 141
0 votes
0 answers
81 views

Unable to build multi architecture docker image

I want to built a docker image on my Intel laptop. The image will be deployed on both x86/x64 and arm64 hosts. The docker file uses ubuntu:20.04 base image. I tried building the image with following ...
RajS's user avatar
  • 141
0 votes
0 answers
50 views

Docker build reset file ownership after each layer built

I've noticed a new strange thing where file permissions reset while building a docker image. Consider the following Dockerfile: FROM ubuntu RUN mkdir -p /home/user && \ useradd -l -u ...
hudac's user avatar
  • 101
0 votes
0 answers
17 views

node_modules is several orders of magnitude bigger inside the container compare to host machine

I have a simple Next project in Docker following the common recommendations for small-size containers. Heres my Dockerfile: FROM node:16-alpine as dependencies WORKDIR /app COPY package.json ./ COPY ...
DomingoSL's user avatar
  • 101
0 votes
1 answer
86 views

Prevent docker to write inside container

I have an extracted container deployed on a shared storage, and want to launch this container locally. However, when I launch this container to run an application, it creates some temporary files ...
Sandy's user avatar
  • 1
0 votes
0 answers
40 views

How to run pytorch on gitlab-runner via docker?

I am learning gitlab ci/cd with a AI/Deep learning application in mind. But I wasn't sure how pytorch could be used in a gitlab-runner. According to documentation: The following multi-platform Docker ...
tinlyx's user avatar
  • 109
0 votes
0 answers
25 views

Run Docker container with user who started it

I have two users on host machine usera, userb. I have added these users to the Dockerfile as below. FROM ubuntu:latest ENV DEBIAN_FRONTEND=noninteractive \ TERM=xterm RUN groupadd -g 1111 ...
noonenine's user avatar
0 votes
0 answers
118 views

Cannot install packages with apt in docker image

I'm trying to create my own postgres image that is supposed to connect to a postgreSQL database hosted on AWS RDS, however, I'm having trouble connecting to that database as well as trouble installing ...
ptushev's user avatar
0 votes
0 answers
131 views

Angular universal with docker giving bad gateway

I am trying to dockerizing a angular universal app using nginx, and it's giving me really hard time. It keeps saying 502 bad gateway and I am unable to wrap my head around it. This is my Dockerfile ...
M Safdar Ali Khan's user avatar
0 votes
1 answer
1k views

Docker push getting error EOF to private repository

I'm trying to push images to repo private, but it's getting error below. Before, it was working, but idk what happened... PS C:\Users\user\aplication> docker push registry.apprepo.app/app:1.22.3 ...
Limup's user avatar
  • 1
0 votes
0 answers
54 views

Problem with dockerfile base image

I am trying to run a dockerfile that has Centos 6.9 as base image. However, Docker has withdrawn support for Centos. The dockerfile begins with : FROM centos:6.9 as resultsdbbase # base image ...
MAJID AHMAD's user avatar
0 votes
0 answers
25 views

Unable to understand Docker error

I am new to Docker and trying to run a webserver written in Python. I am using Linux Debian running as virtual machine on a Windows host. I have mounted the required folder from my Windows host to the ...
MAJID AHMAD's user avatar
2 votes
1 answer
827 views

Can't change ownership of folders and files in Docker containers

I am having these two dockerfiles which in both I am adding the command RUN chown -R www-data:www-data /var/www/html to change the ownership to www-data user. The containers seems to build ...
ltdev's user avatar
  • 121
0 votes
1 answer
43 views

how to decrease the docker image layers latency during the image build step?

I am following the Microsoft document to create a custom image of vsts-agent on top of ubuntu and install the required capabilities. Since our environment is not having internet enabled, we used ...
Vowneee's user avatar
  • 101
2 votes
1 answer
643 views

Docker Compose: How do you build an image while running another container?

I'm trying to build a Nuxt 3 application using docker compose. However, I'm having trouble with docker compose and dockerfile configuration. Context To give background on the project that I'm working ...
Zerro97's user avatar
  • 21
0 votes
1 answer
1k views

Multistage docker build for Python distroless image

This is my Dockerfile for distroless image similar to this example FROM python:3.9-slim AS build-venv RUN python3 -m venv /venv # other installation steps go here RUN /venv/bin/pip install --upgrade ...
GopherM's user avatar
  • 103
-1 votes
1 answer
204 views

How do I install BlackDuck on mac?

I am trying to scan container images using the blackdock scanning tool. Unfortunately, I couldn't find any free version to play around with; please provide guidance and the simplest way to scan the ...
user3795861's user avatar
0 votes
2 answers
150 views

How do I run a CI build in a docker image matching the current `Dockerfile` while being resource-aware?

Given a repository containing a Dockerfile that defines the build environment used by the CI pipeline as well as by the developer (e.g. as a Visual Studio Code devcontainer), the CI pipeline shall ...
Roland Sarrazin's user avatar
0 votes
1 answer
4k views

Docker warning about platform not matching the host platform

I have a Dockerfile that works on both mac and windows. But when I create an actual container on mac, I always get a warning that says: PS /Users/me/> docker run -it platformtest /bin/bash WARNING:...
dot's user avatar
  • 115
2 votes
0 answers
319 views

Run commands on docker container and sync automatically with host

I Dockerkized a MENN(Nextjs) stack App, now everything works fine. I run into issues when i need to install npm packages. let me first show you the structure src/server/Dockerfile FROM node:14-alpine ...
uneeb meer's user avatar
0 votes
1 answer
302 views

Buildkit failing arm builds with missing binaries even though they are in $PATH

A few of our developers recently got some M1 machines, I want to provide them with ARM compatible images and have set my sights on Buildkit. I set up a podTemplate in Jenkins and run the build with ...
Kristoffer Sall-Storgaard's user avatar
1 vote
3 answers
812 views

How do I create a Docker image from a container without configuration changes?

I am aware of two ways of creating Docker images: Build the image using a Dockerfile Use docker commit <container_id> against a running container with changes. I find changing a Dockerfile ...
kcghost's user avatar
  • 111
0 votes
1 answer
1k views

Install a RPM from build context without copying it first

During dockerbuild, I'd like to install a (rather big) RPM from build context/host without copying it first into the image in order to keep my image small. Ideally, there would be a way to read a file ...
MRalwasser's user avatar
0 votes
1 answer
1k views

My Python application doesn't communicate with MySQL inside docker. Can someone help me?

The connection is not succeeding in docker. Look at my settings: Dockerfile FROM python:3.8.5-alpine WORKDIR /app COPY requirements.txt . RUN python3 -m pip install --upgrade pip RUN pip install -...
Flavio W.'s user avatar
0 votes
2 answers
79 views

Specify image in Dockerfile based on building client platform/architecture

I have a somewhat specific, Swift-based problem. It seems that none of the official Swift images on Dockerhub support the M1, and instead the only seemingly reliable arm64 Swift images are found at ...
JMA's user avatar
  • 101
5 votes
2 answers
11k views

DNS resolution fails when container is started via docker-compose

I recently decided to try out windows containers and i am using my private minecraft server for that purpose (as a hobby project). I have an image prepared, based on Windows Server Core 2022. When i ...
AdrianDeWinter's user avatar
1 vote
1 answer
1k views

Building a docker container with multiple conda envs

As a novice to the technology I have only a basic knowledge regarding how to build and deploy a docker so i was hoping someone could provide some help. The situation is the following: I need to create ...
bboy's user avatar
  • 11
1 vote
2 answers
317 views

Package installed using Dockerfile not available on Jenkins pipeline stage

I'm having sort of a weird problem with my Jenkins pipeline. I've defined a Dockerfile which installs some tools I need for my CI/CD pipeline, such as node, npm, sfdx, and sfpowerkit (a plugin for ...
Pietro Zuntini's user avatar
0 votes
1 answer
796 views

PROXY is not working inside windows container

I'm using windows containers in windows 10. I've set proxy variables(HTTP_PROXY,HTTPS_PROXY) in environmental variable setup and using VPN. I also configured resources -> Proxies. I was trying to ...
imaheshwaran s's user avatar
5 votes
2 answers
375 views

Best Practice for writing DockerFile

I have mostly seen people using following type of pipeline steps(it varies, but in general this is the flow of steps I have observed) Process: clone repo -> build -> test -> create docker ...
dev2d's user avatar
  • 151
1 vote
1 answer
2k views

Using access tokens on Dockerfile to clone repository: RUN command error

In a Dockerfile, I'm trying to clone several Gitlab repositories that are specified in a file, one per line, using an access token passed as an environment variable set in docker-compose.yml: COPY my-...
dvilela's user avatar
  • 121
0 votes
1 answer
90 views

Continuous Deployment with jenkins

I am a beginner in DevOps. I created a continuous integration cycle using jenkins(docker image) and bitbucket. I used a simple spring boot hello-world project and after CI i got an executable Jar. I ...
Youssef Boudaya's user avatar
0 votes
1 answer
5k views

Having trouble with building Docker image

I'm trying to build a docker image for a software using docker build -t cytools . Here is the output that I'm confused about: [+] Building 0.0s (1/2) ...
mp62442's user avatar
2 votes
3 answers
10k views

How can I get the Docker target platform inside the Build Environment / Dockerfile

I'm doing multi-platform builds with buildx and would like to know if there is a way to determine what platform is currently being build so I can avoid certain steps for certain environments. For ...
Tracker1's user avatar
  • 123
0 votes
1 answer
46 views

is a secrets-provider-container a good idea?

I am looking for a way to provide secrets to a container running on Google Cloud Run responding to the following criteria: secure centralized & pulled based free simple working with a team, with ...
Quentin Gaultier's user avatar
1 vote
2 answers
364 views

Can I build docker image containing ARM executable when running docker build on non-ARM architecture?

I have built on an x86-based Windows laptop a Docker image to be run as a container on an ARM-based architecture (Raspberry Pi 4). Due to ending up with an x86 executable when this is built in the ...
John Ramsden's user avatar
0 votes
0 answers
81 views

How to correctly copy a file when building an image on Docker Hub?

I have a fairly simple Dockerfile, which works locally. However, when I build it on Docker Hub I get the following error: Starting build of index.docker.io/adius/tasklite:next... Step 1/16 : from ...
adius's user avatar
  • 109
2 votes
2 answers
18k views

How to serve a custom index.html using the stock nginx docker image?

How do I serve static content from the default nginx docker image? Given: root@mordor:~# root@mordor:~# docker image ls nginx REPOSITORY TAG IMAGE ID CREATED ...
Nicholas Saunders's user avatar
0 votes
1 answer
627 views

How to navigate to an index.html with nginx?

This builds and runs without apparent error: root@mordor:/home/nicholas/docker/nginx# root@mordor:/home/nicholas/docker/nginx# docker exec -ti some-nginx bash root@2c912aa5ce5c:/# root@2c912aa5ce5c:/...
Nicholas Saunders's user avatar
0 votes
2 answers
2k views

How to copy HTML files to include into nginx?

How do I copy an index.html file into nginx? root@mordor:/home/nicholas/docker/nginx# root@mordor:/home/nicholas/docker/nginx# ll total 12 drwxrwxr-x 2 nicholas nicholas 4096 Nov 13 16:18 ./ drwxrwxr-...
Nicholas Saunders's user avatar
0 votes
2 answers
1k views

Minecraft docker-container refuses connection

So I have this Dockerfile: FROM openjdk:8u212-jre-alpine LABEL maintainer "cowboy_patrick" RUN apk add --no-cache -U \ openssl \ imagemagick \ lsof \ su-exec \ shadow \ bash \ ...
Cowboy_Patrick's user avatar