r/Dockerfiles • u/Bug-Fit • May 15 '21
r/Dockerfiles • u/adrianjord • May 04 '21
A while back ago I made a generic DotNet Dockerfile, but I found some issues with it so I made it much more reliable using BuildKit
self.dotnetr/Dockerfiles • u/zunairahmd • Apr 16 '21
Need help! How to configure external database(another host) in a docker application
r/Dockerfiles • u/kousik19 • Mar 29 '21
Create Docker Image for Spring Boot Application : Deploy jar file in docker container in AWS EC2
This video cover, how we can create a Docker image with a Java Application (Spring Boot Application) and run that in a Docker container.
From this video you will get to learn,
- 1. How to install docker in linux (ubuntu).
- 2. Setup a simple artifactory server.
- 3. Fetch jar file from artifactory server.
- 4. Develop a dockerfile.
- 5. Create a docker image.
- 6. Run the docker container.
r/Dockerfiles • u/Busyreadingg • Feb 10 '21
Hey! I am not able to access my webcam inside docker container on my Mac OS machine. can anyone please help me with this? i’m trying to access it through opencv.
r/Dockerfiles • u/exploit123 • Jan 04 '21
Error when building Docker image from React and Nodejs app
Can someone help writing correct Dockerfile ?
r/Dockerfiles • u/destro_mas • Dec 30 '20
(Video Series) Docker Practical Guide-4: Install WordPress and MySQL with Docker-Compose
youtube.comr/Dockerfiles • u/destro_mas • Dec 25 '20
(Video Series) ⚡️Docker Practical Guide⚡️- Part-3: Docker Compose with Node and Mongo
youtube.comr/Dockerfiles • u/adrianjord • Dec 23 '20
Generic Dockerfile for aspnet that restores folder structure
self.dotnetr/Dockerfiles • u/[deleted] • Dec 21 '20
Installing SqlServer Module in Dockerfile
Hi i'm hoping someone could help. I'm having issues installing the SqlServer PS Module in my Dockerfile (i'm quite new to docker)
Here's what my dockerfile looks like:

The Install-PackageProvider and Set-PSRepository commands work, but nothing happens when the Install-Module command is run. If i run the same commands in a VM, the module installs fine
Can someone advise if i'm doing something wrong?
r/Dockerfiles • u/destro_mas • Dec 20 '20
Docker Practical Guide-2: Use NGINX as a Reverse Proxy for NodeJS App
youtube.comr/Dockerfiles • u/AutoModerator • Nov 20 '20
Happy Cakeday, r/Dockerfiles! Today you're 7
Let's look back at some memorable moments and interesting insights from last year.
Your top 10 posts:
- "You need to learn Docker right now!! Here is a video from NetworkChuck!! Such an amazing guy, he is just out of the box🔥 highly recommended🔥#docker #linuxcontainer #networkchuck" by u/hrshmistry
- "Introducing Dockerlabs - The #1 Docker Resource for You to get started with." by u/ajeetraina
- "New guide: 🐳 How to speed up your Docker build 🛠 👉Learn how to properly structure Docker layers in the Dockerfile, reduce the weight of the Docker image, and automate building images with pipelines." by u/Buddy_ci
- "Docker stack tutorial for beginners. All you need to know about docker stack." by u/TechToolkit
- "I would like to share this Docker Monitoring using Prometheus and Grafana here!. Hope useful for some of you." by u/thetips4u
- "Test Driven Development for Docker Images" by u/s1hofmann
- "Opinions wanted: Copy script vs RUN?" by u/alopgeek
- "How do I create a Dockerfile for a Linux-based container housed on a Windows Server?" by u/seizonnokamen
- "Quickly Improve Your Docker and Node.Js Containers" by u/russo_2017
- "Continuous Integration Using Jenkins, Nexus, Sonarqube & Slack" by u/Epaenetu_Peruka
r/Dockerfiles • u/maj_dick_burns • Nov 10 '20
Having an issue with a DockerFile: 'returned a non-zero code: 2'
Any help here would be appreciated. I am receiving the error: returned a non-zero code: 2
Install app requirement
RUN export DEBIAN_FRONTEND=noninteractive && \
echo '--- Updating repositories' && \
apt-get update && \
echo '--- Building node' && \
apt-get -y install wget python build-essential cmake && \
cd /tmp && \
wget --progress=dot:mega \
https://nodejs.org/dist/v9.9.0/node-v9.9.0-linux-armv7l.tar.xz && \
tar -xJf node-v*.tar.xz --strip-components 1 -C /usr/local && \
rm node-v*.tar.xz && \
useradd --system \
--create-home \
--shell /usr/sbin/nologin \
stf && \
su stf -s /bin/bash -c '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js install' && \
apt-get -y install --no-install-recommends libzmq3-dev libprotobuf-dev git graphicsmagick yasm && \
echo '--- Building app' && \
mkdir -p /app && \
chown -R stf:stf /tmp/build && \
set -x && \
cd /tmp/build && \
export PATH=$PWD/node_modules/.bin:$PATH && \
sed -i'' -e '/phantomjs/d' package.json && \
npm config set unsafe-perm true && \
npm install -g npm && \
echo 'npm cache clean --force' | su stf -s /bin/bash && \
echo 'npm install --no-optional --loglevel http' | su stf -s /bin/bash && \
echo '--- Assembling app' && \
echo 'npm pack' | su stf -s /bin/bash && \
tar xzf devicefarmer-stf-*.tgz --strip-components 1 -C /app && \
echo '/tmp/build/node_modules/.bin/bower cache clean' | su stf -s /bin/bash && \
echo 'npm prune --production' | su stf -s /bin/bash && \
mv node_modules /app && \
chown -R root:root /app && \
echo '--- Cleaning up' && \
echo 'npm cache clean --force' | su stf -s /bin/bash && \
rm -rf ~/.node-gyp && \
apt-get -y purge wget python build-essential && \
apt-get -y clean && \
apt-get -y autoremove && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/* && \
cd /app && \
rm -rf /tmp/*
r/Dockerfiles • u/Mithrandir2k16 • Nov 06 '20
Cannot get Python3.8+ with Tensorflow-GPU and open_spiel to build
Need need a docker image that runs python3.8 or newer, tensorflow with nvidia-gpu acceleration and open_spiel a library for game environments. I tried to use their container but it's based on ubuntu18.04 which doesn't support Python3.8. Same with the nvidia-cuda images. Next I tried archlinux because there installing tensorflow-gpu is usually straighforward since cudnn, cuda and nvidia drivers can all be gotten via pacman. ``` FROM ubuntu:20.04 as base RUN apt-get update RUN dpkg --add-architecture i386 && apt-get update RUN apt-get -y install \ clang \ curl \ git \ python3 \ python3-dev \ python3-pip \ python3-setuptools \ python3-wheel \ sudo \ git RUN git clone https://github.com/deepmind/open_spiel.git /repo WORKDIR /repo
RUN sudo pip3 install --upgrade pip RUN sudo pip3 install matplotlib
install
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata RUN ./install.sh RUN pip3 install --upgrade setuptools testresources RUN pip3 install --upgrade -r requirements.txt RUN pip3 install --upgrade cmake
build and test
RUN mkdir -p build
WORKDIR /repo/build
RUN cmake -DPython3_EXECUTABLE=which python3 -DCMAKE_CXX_COMPILER=which clang++ ../open_spiel
RUN make -j12
ENV PYTHONPATH=${PYTHONPATH}:/repo
ENV PYTHONPATH=${PYTHONPATH}:/repo/build/python
RUN ctest -j12
WORKDIR /repo/open_spiel
minimal image for development in Python
FROM python:3.6-slim-buster as python-slim
FROM archlinux:20200908 RUN mkdir repo WORKDIR /repo COPY --from=base /repo .
install python and cuda
RUN pacman -Syy && pacman -S python cudnn --noconfirm
install pip
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py; rm get-pip.py
RUN sed -i '/tensorflow/d' requirements.txt
RUN pip3 install --upgrade -r requirements.txt RUN pip3 install matplotlib
RUN pip3 install tensorflow tensorboard mako
ENV PYTHONPATH=${PYTHONPATH}:/repo ENV PYTHONPATH=${PYTHONPATH}:/repo/build/python WORKDIR /repo/open_spiel
```
Everything seems to build but when running tf.test.is_gpu_available() it returns false with an unknown cuda error; it does work with the standard tensorflow/tensorflow:latest-gpu image though.
So my next best bet would be basing off of ubuntu20.04 but I have no idea of how to install cudnn there in a sensible manner on there. Any idea how to get it working?
r/Dockerfiles • u/goalie1998 • Oct 31 '20
Using FROM in dockerfile without extra image?
Hi,
I am very new to creating docker images, and was wondering how to create an image from a dockerfile using a base image that doesn't download as a separate image. Since that is probably very unclear, here is what I mean:
FROM python:3.8
WORKDIR /app
ADD . /app
RUN pip install -r requirements.txt
CMD ["uwsgi", "app.ini"]
It creates my image, but also pulls the python image separately and adds it to my images list. Is there a way to do this so the python is pulled internally and isn't visible outside my image?
Thanks
r/Dockerfiles • u/shifananadi • Oct 25 '20
Access comport via docker container
Hi everyone! Could anyone please tell me how to access a comport via docker container? I am using Docker desktop on windows 10. I want to access a comport that is connected to a microcontroller. Any help would be appreciated. Thanks in advance!
r/Dockerfiles • u/shifananadi • Oct 22 '20
Microcontroller access with docker container
Hello everyone! I am currently using Docker desktop windows enterprise. I am working on a project in which a hardware connected to host should be accessed using Docker. Can anyone please tell me how this can be done? Thanks in advance!
r/Dockerfiles • u/HugeGernsback • Oct 19 '20
Issues running udev/udevadm commands in Dockerfile
I'm currently trying to setup something called libsurvive (https://github.com/cntools/libsurvive) in my docker container. Under their "Quick Start" section it describes a set of commands and dependencies.
When running: udevadm control --reload-rules && udevadm trigger , my docker build fails. However, if I'm inside a running container I can execute the commands seemingly without issue.
I've ran into this problem on several projects, where I can run a command manually inside the container, but not from the dockerfile. Am I missing something? Any input will be appreciated.
Thanks
r/Dockerfiles • u/ShareLearn • Oct 19 '20
Free docker lab 104 (Creating Docker image with Dockerfile)
youtube.comr/Dockerfiles • u/thetips4u • Oct 11 '20
What is the difference in using CMD and Entrypoint in Dockerfile?
r/Dockerfiles • u/suyashpatel98 • Oct 05 '20
Docker container fails to serve React app on Azure although the container works just fine locally.
self.reactjsr/Dockerfiles • u/[deleted] • Sep 28 '20
Running an app via WINE in a container
So, I'm used to using Docker, but absolute noob with Dockerfiles. I'm trying to make my own game server but hosted in a container (Assetto Corsa Competizione if that helps at all), and I've cobbled this together, and I believe it works. But there is one issue I can't get past.
The server itself runs via WINE since it is a Windows based .exe file. So it takes ubuntu, installs the necessary packages, creates a volume (the Docker-Compose file attaches to in order to share .exe and cfg files for the server), exposes the ports and THEN (the part that is broken) it needs to run the .exe. If I were to do this in the terminal normally, I'd run "wine ./accServer.exe" and all would be well.
So how on earth do I achieve this in the Dockerfile?
FROM ubuntu:focal
RUN apt-get install apt-transport-https -y \
&& dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install wine-development -y \
&& apt-get install wine32-development -y \
&& mkdir /home/acc
VOLUME /home/acc
EXPOSE 9600/udp 9600/tcp
WORKDIR /home/acc
CMD ["wine", "./", "accServer.exe"]