dockerfile

How to populate a Mysql docker container during build of another container?

删除回忆录丶 提交于 2021-02-05 05:30:10
问题 I am trying to build a docker-compose file that automatically builds a container for my application and a mysql-container that stores all the data. Within my dockerfile for my application I have a script, that sets up all the database tables and preset values, that are necessary for the application to run. Is it possible to somehow pass the reference of the mysql container to myapplication that during build of myapplication it can access the mysql container? If so, how can I do that, and if

Super Slow Docker Build

血红的双手。 提交于 2021-02-04 17:09:46
问题 I think I'm going to go crazy. I've searched all over and can't seem to find a working solution both here on Stack, GitHub and other far reaches of the interwebs. On this particular project, running docker-compose build is taking FOREVER . It didn't use to be this way, and on other projects that use Docker, it's not an issue at all. And by forever... I'm talking around 10-15 minute build times when it used to only take around 2 minutes tops. I had two separate coworkers DL the same repo (one

Docker History Base Image Add:sha256hash

放肆的年华 提交于 2021-02-03 07:52:12
问题 I'm trying to better understand the docker history output. When I run docker history nginx:latest I get output that nearly matches the Dockerfile: /bin/sh -c #(nop) CMD ["nginx" "-g" "daemon off;"] /bin/sh -c #(nop) EXPOSE 443/tcp 80/tcp/bin/sh -c ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log /bin/sh -c apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb http://nginx.org/packages/mainline

Docker input file and save in output

我是研究僧i 提交于 2021-02-02 09:20:09
问题 I built a docker image that inputs a local file, does some stuff to it, and returns an output file saved locally, but it does not work. How do I allow local, user input for files and then saving the output on the local machine? My Dockerfile looks like this: FROM python:3 WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt COPY . /app EXPOSE 5000 CMD [ "python", "process.py" ] Ideally, the terminal command would be something like this: docker run -p 5000:5000 [name of

How can I run Selenium tests in a docker container with a visible browser?

六眼飞鱼酱① 提交于 2021-02-02 08:26:02
问题 If I want to run Selenium tests inside a Docker container with a visible (not headless) browser, what are my options? Do I need to use a remote display viewer such as VNC? Is it possible to use a browser on the host? (I.e. a browser that is not in the Docker container). How does this work? Any other option? 回答1: Docker Docker is a software containership platform that provides virtualization from the os. In Docker, all software parts are organised as containers which includes the operating

Port 80 and Port 443 not accessible when published via `ports` in Docker

孤者浪人 提交于 2021-01-29 22:06:53
问题 My ASP.Net Core application is able to connect to a postGres database using Docker and Docker compose successfully(please see Docker-Compose up output below). I am however not able to browse to either the ASP.Net Core application or adminer(Postgres client) on my docker containers, from my PC using the urls http://IP_AddressOfRunningDockerContainer:443 or http://IP_AddressOfRunningDockerContainer:8080 respectively. What could I be missing? Command to get IP address of container(and its output

Port 80 and Port 443 not accessible when published via `ports` in Docker

北城以北 提交于 2021-01-29 20:41:50
问题 My ASP.Net Core application is able to connect to a postGres database using Docker and Docker compose successfully(please see Docker-Compose up output below). I am however not able to browse to either the ASP.Net Core application or adminer(Postgres client) on my docker containers, from my PC using the urls http://IP_AddressOfRunningDockerContainer:443 or http://IP_AddressOfRunningDockerContainer:8080 respectively. What could I be missing? Command to get IP address of container(and its output

Dockerfile: How to source Anaconda

假如想象 提交于 2021-01-29 18:24:01
问题 I am trying to set up an Anaconda environment with AWS Batch Here is a snippet from my Dockerfile #: Download Anaconda COPY Anaconda3-2019.10-Linux-x86_64.sh /setup/ RUN bash Anaconda3-2019.10-Linux-x86_64.sh -b -p /home/ec2-user/anaconda3 RUN echo 'export PATH=$PATH:/home/ec2-user/anaconda3/bin' >>~/.bashrc \ && /bin/bash -c "source ~/.bashrc" ENV PATH $PATH:/home/ec2-user/anaconda3/bin # Create the environment: COPY environment.yml . RUN conda env create -f environment.yml # Make RUN

tun interface inside docker not able to read packets from host

血红的双手。 提交于 2021-01-29 17:30:04
问题 I am trying this tutorial for creating and using tun interface. In my case, I want to use it inside a docker container. My host and docker container both are Linux with mknod support. I am trying to get tun interface inside the container to read packets from host but without using --network=host . Based on the docker run doc, I am mapping host /dev/net/tun inside docker using --device . Then adding capabilities NET_ADMIN (also tried adding MKNOD , NET_RAW but does not seem to help). Then

How to build Dockerfile with R & Java

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-29 16:17:05
问题 I'm trying to build a Docker container that runs R with the package RJava. I have tried the following code: # Install R version 3.6.3 FROM rocker/tidyverse:3.6.3 # Make ~/.R RUN mkdir -p $HOME/.R # Install Ubuntu packages && then R packages RUN install2.r --error \ lubridate magrittr RPostgres DBI broom rlang rJava However I get the following: installation of package ‘rJava’ had non-zero exit status. Can anyone help me with this. I'm thinking that maybe it is because Java is not installed.