Questions tagged [dockerfile]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
46 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 ...
1
vote
1answer
64 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 ...
0
votes
0answers
30 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 ...
1
vote
0answers
19 views

Redhat Nodejs-minimal yarn not found

Coming across a very odd issue here: Whenever I try using a ubi8/nodejs-14-minimal base image, the build fails with /bin/sh: yarn not found. I have installed yarn already by adding a Run npm install ...
4
votes
2answers
92 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 ...
1
vote
1answer
29 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-...
0
votes
1answer
53 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 ...
0
votes
1answer
352 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) ...
1
vote
2answers
178 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 ...
0
votes
1answer
25 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 ...
1
vote
2answers
93 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 ...
1
vote
0answers
45 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 ...
1
vote
2answers
1k 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 ...
0
votes
1answer
56 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:/...
0
votes
2answers
129 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-...
0
votes
2answers
157 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 \ ...
2
votes
1answer
31 views

why use multiple From instructions in multistage build?

I'm new to Docker, sorry if my question sounds dumb. below is a dockerfile from a textbook shows how multistage build works: FROM diamol/base AS build-stage RUN echo 'Building...' &...
2
votes
2answers
59 views

Unable to build Image as it is asking some input

I am trying to create an Image which will run ftp server on centos. Dockerfile content is as below: FROM centos RUN \ yum update -y && \ yum install vsftpd -y EXPOSE 21 CMD vsftpd -...
1
vote
1answer
131 views

Grant access permission to file when mounting from host

Below is except of my docker-compose.yml file I am trying to mount from host file inside the container, which works i.e. able to mount but then I need to give it permission (my clumsy chown command, ...
2
votes
1answer
10k views

Permission denied within mounted volume inside Docker/Podman container

I am starting to learn about containers using podman that came with RHEL8.1 (which AFAIK can be used in place of docker), and have the following baby Dockerfile as a learning exercise: # Use Alpine ...
1
vote
1answer
41 views

Why does running echo with exec form in a Dockerfile create /etc/resolv.conf?

I was trying to build a Docker image from a Dockerfile and I had a line in there which reads: RUN ["echo", "'anything'", ">", "./a_file"] This didn't work, and I eventually had to use: RUN ["sh",...
1
vote
1answer
21 views

Running Two infinite commands on single pod/image

I have a Dockerfile with a CMD, it calls a .sh file that runs a Django app ( makemigrations, migrate and uwsgi ) And that runs fine in a pod. There's a django admin script that runs infinitely that I'...
2
votes
1answer
138 views

Multiple apps (microservices) and one proxy (nginx) docker-compose configuration/architecture

Having the following architecture: Microservice 1 + DB (microservice1/docker-compose.yml) Microservice 2 + DB (microservice2/docker-compose.yml) Proxy (proxy/docker-compose.yml) Which of the ...
4
votes
1answer
153 views

Should I chunk my docker images in many small layers instead of one large?

When I build docker image for existing applications I try to use as few layers as possible and clean up any unwanted files. For example building an image for moodle: # Dockerfile for moodle instance. ...
0
votes
1answer
42 views

Does Docker images works without client application

I recently installed Docker in Ubuntu 18.04 and with that, I have downloaded the mariadb image like this docker run --name mariadb \ -p 3306:3306 \ -v /opt/mariadb_data:/var/lib/mysql \ -e ...
1
vote
1answer
53 views

Do I need header files once I install the php extention on Dockerfile?

Usually when I build docker images for php I use this approach: FROM php:7.2-apache RUN apt-get update && \ apt-get install -y libghc-postgresql-simple-dev &&\ docker-php-...
1
vote
1answer
665 views

create entry-point script to get all env variables starting with VUE_APP_ and take it's value

I would like to Dockerize my existing vuejs app for staging , production and I used multi staged approach to create my app container and I'm using Ubuntu 18.04 and this is my, Dockerfile # build stage ...
1
vote
2answers
5k views

docker | database connection refused between two containers

I have a mysql database running with the following docker-compose.yml: version: '3.3' services: db: image: mysql:5.7 restart: always environment: ...
3
votes
1answer
282 views

How to pin OS package versions in Docker image

Scenario For obvious reasons I believe that every package installed in a Docker image should have their version nailed down. That's why in our Dockerfile we always enforce the OS package manager to ...
1
vote
1answer
45 views

How to develop a docker container for laravel without laradock or docker-compose

I am very new to docker. I want to build a laravel development environment with docker. I already tried laradock but it seemed complicated for me. I was wondering whether it is possible to create a ...
0
votes
1answer
49 views

Using 32 bit for savings

What are the downsides for CI servers to use 32 bit Docker images? For example, using FROM i386/python:3.6.9-alpine3.9 instead of python:3.6.9-alpine3.9 in Dockerfile. python:3.6.9-alpine3.9 (32 bit,...
0
votes
2answers
32 views

Configure Kubernetes with docker container on Ubuntu VM

I am using the YAML file to deploy the container on Kubernetes with some replication factor on a hosted machine. YAML File apiVersion: apps/v1 kind: Deployment metadata: name: mojo-deployment ...
2
votes
1answer
2k views

Jenkins does not seem to be running inside a container

I am getting an error while running the Jenkins file tp build and push the docker image into docker hub . you can reveiw my code github : https://github.com/iakshaykr/webapp.git (using jenkins_pipe ...
0
votes
1answer
42 views

How to create slave jenkins given master jenkins?

Below code snippet, taken from here creates master jenkins that runs in a container: # Create Docker Group with GID # Set default value of 497 if DOCKER_GID set to blank string by Docker Compose RUN ...
3
votes
1answer
291 views

Adding default external network in docker-compose

I am trying to learn docker and understanding docker-compose As I was trying out the external network section: networks: default: external: name: my-pre-existing-network I understand ...
-1
votes
1answer
135 views

How to find the Linux distro used as the basis for an official docker image?

I already think I understand that docker containers "share" the same Linux kernel running on their host. But inside a particular docker container, the software stack could be a distro debian, alpine, ...
1
vote
1answer
22 views

Deploy dist file in docker file

How to write a docker file to deploy a dist file of an Angular Application In a server. I see most of them have used nginx as a server. Why is it so? Is there any specific reason I want it to be ...
0
votes
2answers
99 views

Docker: PHP deployment in apache, couldn't acces container URL in local browser; shows blank page [closed]

I'm trying to deploy PHP files in Apache container using Dockerfile, Dockerfile on console shows successfully built and tagged but after running the container, i couldn't access the container IP or ...
0
votes
1answer
533 views

cannot import OpenCV in a Docker container in Raspberry Pi

I am trying to build a Docker container in Raspbian 10. FROM python:3.5-buster RUN apt-get update RUN apt-get install apt-utils -y RUN apt-get install python-opencv -y RUN apt-get install python3-...
2
votes
3answers
674 views

How to automatically update Docker containers in development?

What is the best way to use Docker in development so that a container is automatically updated each time you make a change to the codebase?
3
votes
1answer
7k views

npm not found but installed from the shell script file in Dockerfile

I have a following Dockerfile: FROM ubuntu:18.04 RUN mkdir app && cd app WORKDIR app/ RUN apt-get update && apt-get install -y \ software-properties-common \ curl \ sudo ...
0
votes
1answer
38 views

Using the built binary of a docker image in another docker image

Problem I have two repositories A and B. I have a docker image registry, where I can push the docker images made of the repositories A and B. I need only the binary of A's source code to be included ...
3
votes
2answers
361 views

What is the difference between RUN and CMD in a Dockerfile?

I am going to change my permission of files to 600. The following command works perfectly. RUN /bin/bash -c 'chmod 600 /root/.ssh/config' But this one failed CMD /bin/bash -c 'chmod 600 /root/.ssh/...
1
vote
2answers
2k views

jar file is not displaying in docker container

I have an sbt project and i am creating its Jar using the sbt publishLocal command and i want a docker image for that i am doing something like this FROM hseeberger/scala-sbt:11.0.2_2.12.8_1.2.8 ...
0
votes
2answers
1k views

Docker not exposing port on mojave mac

I used brew to install docker, docker-machine and docker-compose. Everything is working, but when I use expose to map port on my host machine, it is not working. When I ssh in docker machine service ...
2
votes
1answer
1k views

How to connect to host during a Docker build?

I have a Dockerfile which I want to run some tests inside of as part of a multistage build. The tests attempt to make a connection to localhost, however it appears that they're not able to connect to ...
2
votes
1answer
2k views

running a phpUnit test within a docker container

i want to run a specific version of phpUnit WITHIN a docker container. This container will use a specific version of php. i.e php:5.6-apache Its a lareval application. i have install phpunit via ...
0
votes
1answer
51 views

TravisCI build continues to fail even after changing alpine version

So I ran my Docker build with TravisCI and I got a failure like so: FAIL src/App.test.js ● Test suite failed to run TypeError: Cannot assign to read only property 'Symbol(Symbol.toStringTag)' ...
0
votes
2answers
191 views

How do i specify the path of a Dockerfile using Blue Ocean

I want my pipeline created using Blue Ocean (Jenkins) to build with a dockerfile that is not in the root of the git repo. How do I achieve this? Our git repo is a collection of sub-projects with each ...
0
votes
2answers
67 views

Is there an elegant way to use a Dockerfile argument to tag an image?

I use and argument (ARG) in my Dockerfile to download a particular version of an application. I would like to tag my image with that version number. I end up writing something like that: sh$ ...