Questions tagged dockerfile

Explore the latest questions and answers asked by our top developers.

passing arguments to stdin in linux

I am making a Dockerfile and want to install xfce4. This is what I am currently trying: RUN /bin/bash -c ‘echo y 12 4 2 | apt install xfce4 tightvncserver’ During installation, I am first prompted by a yes or no for installation. Then, I am prompted to give my geographical location (for some reason) […]

By Joshua Shin
Published
Categorised as docker, dockerfile, linux Tagged , ,

Build in a linux container fails to find gtest (using vcpkg and CMake)

I’ve tried build a project in a container and have some very (simple?) problem. I have a couple of unit tests that use gtest and chose to use vcpkg to build it since I aim to target windows/linux machines. When I build on my or someone else’s computer everything seem to work, but when I […]

Java dependency error while runing docker build

Running docker build using below command docker build -t pingo-w. getting these errors; Get:6 http://ftp.cp.debian.org/debian stretch/main amd64 Packages [7080 kB] Fetched 7330 kB in 3s (2175 kB/s) Reading package lists… Reading package lists… Building dependency tree… Reading state information… Some packages could not be installed. This may mean that you have requested an impossible situation […]

By singh
Published
Categorised as dockerfile, java Tagged ,

Unable to mount host directory to docker container

I have a python app which runs everyday to download images and saves into specified folder with each day folder creation like this /home/ubuntu/images/yyyymmdd. I have build docker container of my python app on ubuntu 20. When i try to run app by mounting host directory then log message prints folder created /home/ubuntu/images/20220123 but i […]

By SRK
Published
Categorised as docker, docker-compose, dockerfile, python, ubuntu Tagged , , , ,

anonymous volume mount is failing with read-only file system error

I want to sync my code to docker container when developing the application so that I don’t need to rebuild the image after code changes but If I delete node_modules from code on host machine (using volumes: – ‘.:/app’) then after running container it gives error because due to directory sync it deletes the node_modules […]

Dockerfile Java Spring Boot – how to add folder for logs

I want to dockerize my spring boot app. In app main folder i have folder for logs: (spring app main folder)/data/log/zocbot/ In my log4j2.xml i have: <Properties> <Property name="logDirectory">./data/log/zocbot/</Property> <Property name="logDirectoryArch">./data/log/arch/zocbot/</Property> <Property name="logFileNameMain">bot-main</Property> </Properties> And i try with Dockerfile: FROM azul/zulu-openjdk-alpine:11 RUN addgroup -S spring && adduser -S spring -G spring ADD ./data/log/zocbot/ /log/ #VOLUME […]

By Pawel W
Published
Categorised as dockerfile, java, log4j2, spring-boot Tagged , , ,

Import private PyPi Repository into Docker container

I’m trying to Dockerize a Python application that uses a package from a private PyPi repository. The problem is, none of the guides I’m finding online seem to work. I’d imagine such a thing is probably used fairly widely so it can’t be that difficult to do, but I seem to be having trouble. I […]

By Ertai87
Published
Categorised as docker, dockerfile, pip, python-3.x Tagged , , ,

Docker Nginx with React and Laravel

So I want to have a single Nginx web server serving both frontend and backend with Docker. Here is my docker-compose: version: "3.8" services: db: #mysqldb image: mysql:5.7 container_name: ${DB_SERVICE_NAME} restart: unless-stopped environment: MYSQL_DATABASE: ${DB_DATABASE} MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} MYSQL_PASSWORD: ${DB_PASSWORD} MYSQL_USER: ${DB_USERNAME} SERVICE_TAGS: dev SERVICE_NAME: mysql ports: – $MYSQLDB_LOCAL_PORT:$MYSQLDB_DOCKER_PORT volumes: – ./docker-compose/mysql:/docker-entrypoint-initdb.d networks: – backend mrmfrontend: […]

How to build image via Docker API

I want to build a docker image via the dedicated Docker API. I have the following Dockerfile, which resides among other source code files. FROM alpine:3.10 RUN mkdir /app COPY . /app WORKDIR /app RUN echo "**** install Python ****" && apk add –no-cache python3 && if [ ! -e /usr/bin/python ]; then ln -sf […]

By t sologub
Published
Categorised as docker, dockerfile Tagged ,

cant find MainVerticle in Docker when using COPY

I’m trying do dockerize a project. I’m using vertx and the buildin JWTAuthOptions-library and so i have a keystore file. When I’m trying to dockerize the program with the dockerfile-example from the vertxdocs it can’t find the keystore file. FROM vertx/vertx4 ENV VERTICLE_NAME verdatas.backend.MainVerticle ENV VERTICLE_FILE target/test2-1.0.0-SNAPSHOT.jar ENV VERTICLE_HOME /usr/verticles EXPOSE 8080 COPY $VERTICLE_FILE $VERTICLE_HOME/ […]

By Roby36
Published
Categorised as docker, dockerfile, java, vert.x Tagged , , ,
1 2 3 4 609

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq