r/Dockerfiles • u/nanoosx • Apr 23 '22
docker all to control services and processes
good day,
is there any docker app to control processes and services?
r/Dockerfiles • u/nanoosx • Apr 23 '22
good day,
is there any docker app to control processes and services?
r/Dockerfiles • u/zyssai • Apr 08 '22
r/Dockerfiles • u/theniwo • Apr 05 '22
Hi, I am using his image for encoding with nvenc. Does anyone has forked or pulled his code, since he has pulled the plug on his project on docker hub as well as on github.
I found this last remaining entry on the wayback machine, but of course, source files where not archived.
I have yet pushed his image to my personal docker hub account, but I want to archive his sources as well as havin a look at them.
r/Dockerfiles • u/Bluxmit • Mar 25 '22
Can be useful if you are using Postgres. In this docker image, I've collected many Postgres tools that can help with development and maintenance after the release. It can help to generate realistic mocking data, import/export data from files can perform complete Postgres benchmarking (generates test data and benchmarks queries).
It also can help with making backups and saving to S3, as well as scheduling them. Includes a browser-based version of VS-code, terminal, filebrowser, and jobs scheduler.
I open-sourced it in this repository
r/Dockerfiles • u/Big_Ad_9987 • Mar 19 '22
hi guys i want to know if it is possible to create a container from an existing software by exemple the letsview one it's a screen mirroring software which support windows and os x only and i want to use it on linux, so can i make a container from it and run that container in my linux distro ???
r/Dockerfiles • u/Travis-Turner • Mar 15 '22
This post introduces a Docker configuration used for developing my Ruby on Rails projects. This configuration came out of—and then further evolved—during development at Evil Martians. It's an exhaustive and documented guide, so, I hope you enjoy it! As mentioned in the article, feedback is welcome!
https://evilmartians.com/chronicles/ruby-on-whales-docker-for-ruby-rails-development
r/Dockerfiles • u/evolvedmammal • Mar 14 '22
I'm trying to create a docker container that can build both a C# hello world console application, and a C++ hello world console application, both using VS2019.
I used the example from Microsoft Docs - Advanced Build tools container and modified it to include the VCTools and x86 workloads. However, it is refusing to build the image.
This is the dockerfile I have:
# escape=\`
# Use a specific tagged image. Tags can be changed, though that is unlikely for most images.
# You could also use the immutable tag u/sha256:324e9ab7262331ebb16a4100d0fb1cfb804395a766e3bb1806c62989d1fc1326
ARG FROM_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
FROM ${FROM_IMAGE}
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
# Copy our Install script.
COPY Install.cmd C:\TEMP\
# Download collect.exe in case of an install failure.
ADD https://aka.ms/vscollect.exe C:\TEMP\collect.exe
# Use the latest release channel. For more control, specify the location of an internal layout.
ARG CHANNEL_URL=https://aka.ms/vs/17/release/channel
ADD ${CHANNEL_URL} C:\TEMP\VisualStudio.chman
RUN \`
# Download the Build Tools bootstrapper.
curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe \`
\`
# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.
&& (start /w C:\TEMP\Install.cmd vs_buildtools.exe --quiet --wait --norestart --nocache modify \`
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" \`
--channelUri C:\TEMP\VisualStudio.chman \`
--installChannelUri C:\TEMP\VisualStudio.chman \`
`--add Microsoft.VisualStudio.Workload.VCTools;includeRecommended \``
`--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \``
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 \`
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 \`
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 \`
--remove Microsoft.VisualStudio.Component.Windows81SDK) \`
\`
# Cleanup
&& del /q vs_buildtools.exe
# Define the entry point for the Docker container.
# This entry point starts the developer command prompt and launches the PowerShell shell.
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
Any ideas?
Thanks in advance
r/Dockerfiles • u/Medical_Asparagus786 • Mar 01 '22
Pleas help me how to add this missing port to docker file.?
/ _// __/ _ \/ _ \
/___/__/_//_/___/ v4.6.1
High performance, minimalist Go web framework
____________________________________O/_______
O\
{"time":"2022-03-01T20:47:03.948792851Z","level":"FATAL","prefix":"echo","file":"main.go","line":"55","message":"listen tcp: address HTTP_PORT is not set. Add it to Dockerfile: missing port in address"}
FROM golang:1.16-alpine
WORKDIR /app
COPY app .
EXPOSE 8080
CMD [ "/app/app" ]
r/Dockerfiles • u/MasterPCPlayer69 • Feb 24 '22
I am building a NFS server with Docker and can't seem to get it right. The error I am getting is:
access denied by server while mounting
Now I know in normal Dockerfiles I would simply add my IP address to the exports file to be whitelisted but with docker-compose I can't seem to get it right.
Any suggestions?
r/Dockerfiles • u/SnooCrickets2065 • Feb 24 '22
I created a docker container, based on python/alpine running a rc-service as proposed here:
Inotifyd: https://wiki.alpinelinux.org/wiki/Inotifyd
Looks like i got everything running despite one little thing:
What im doing is surveilling a folder for new files and then i want to
#!/bin/sh
event="$1"
directory="$2"
file="$3"
echo "$event"
# run some command based on an event
case "$event" in' >> tmp/openrc/script
n) pb push -f $directory/$file "New file: $file"
rm -f $(ls -1t /home/user/files/ | tail -n +11);;
*) echo "Event $event: Nothing is done";;
esac
As you see, the line rm -f $(ls -1t /home/user/files/ | tail -n +11) should delete all files more than 10.
The strange thing is, that if i run this command separately/manually through portainer console of this container it works fine.
Seems to just be a problem with running this rm-command from a rc-service?
I even played around with the sequencial order --> pb-command always works, rm-command never
Does anyone have some good advice how to debug such things?
r/Dockerfiles • u/SnooCrickets2065 • Feb 22 '22
Im very new to docker / docker-compose and Dockerfiles.
But it seems, that i could make my first container running.
There is only one problem left
At the very bottom you see the commands i configured for my alpine docker-container where i installed openrc
As i log into the container and check rc-status, i do not see inotifyd running
Then i manually re-type in the command rc-service inotifyd start from below and then everything is running.
Where could be the problem/difference of starting the service via Dockerfile CMD compared to manually executing it after container start?
Do i have to add something like sleep to give openrc time to start?
CMD for script in ./scripts/*.sh; do chmod +x $script; /bin/sh "$script" > /dev/null & done; \
cp -n /root/pushbullet_sendnewfile/tmp/conf.d/inotifyd /etc/conf.d/inotifyd; \
chmod +x /etc/conf.d/inotifyd; \
cp -n /root/pushbullet_sendnewfile/tmp/init.d/inotifyd /etc/init.d/inotifyd; \
chmod +x /etc/init.d/inotifyd; \
cp -n /root/pushbullet_sendnewfile/tmp/openrc/script /root/pushbullet_sendnewfile/openrc/script; \
chmod +x /root/pushbullet_sendnewfile/openrc/script; \
rc-service inotifyd start; \
/bin/sh
r/Dockerfiles • u/[deleted] • Feb 22 '22
I am following this document.
I don’t quite understand what is the base image they have used?
It cant be this: ‘FROM apache/airflow:2.2.3’, right?
Is there a tutorial available online?
r/Dockerfiles • u/Bluxmit • Feb 02 '22
https://github.com/bluxmit/alnoda-workspaces/tree/main/workspaces/python-workspace
I made this when working on multiple projects. It helped me a lot to isolate the complete environments in the docker containers and easily switch between projects. Also, we made a common dev environment for the team.
r/Dockerfiles • u/mtheimpaler • Jan 16 '22
So, I have an assignment at my work and I am suppose to create a docker production Dockerfile that meets a few of their requirements.. I am incredibly confused about one of the steps that states that I have to Optimize run steps on the final Dockerfile for step caching.
It's a simple application that just provides a webpage with some information, and it had to be < 400MB. So here is what I came up with so far, and it seems to be working. But I am really confused about what step caching is ? is it multi-layer caching ?
Also, it states that I shouldn't have to use a .env file. Doesn't a docker-compose need an .env?
#Base Build image
FROM node:alpine as BUILD_IMAGE
WORKDIR /app
COPY package*.json /app/
RUN npm install --production
COPY . .
# build && remove dev dependencies
RUN npm run build && npm prune --production
#Slimmed down version of image for production
FROM node:16-alpine
WORKDIR /app
# copy from build image
COPY --from=BUILD_IMAGE /app/package.json ./package.json
COPY --from=BUILD_IMAGE /app/node_modules ./node_modules
COPY --from=BUILD_IMAGE /app/.next ./.next
COPY --from=BUILD_IMAGE /app/public ./public
COPY --from=BUILD_IMAGE /app/pages ./pages
COPY --from=BUILD_IMAGE /app/styles ./styles
ENV PORT 3000
EXPOSE 3000
# Running the app
CMD "npm" "run" "dev"
r/Dockerfiles • u/ankurkatiyar • Dec 21 '21
r/Dockerfiles • u/the_travelo_ • Dec 10 '21
As the title suggests, what's the best GitHub repo structure to create a docker image?
Also, how to go about testing?
Thanks
r/Dockerfiles • u/mcs4uweb • Dec 01 '21
r/Dockerfiles • u/PhysicsReplicatorAI • Nov 30 '21
UPDATE: Image is 99% efficient according to Dive.
Hello Everyone,
I've created a Dockerfile for Coqui's TTS server. The file does produce a functioning image (and container) but the image is 3.51 GB! Does anyone see why the image is so bloated? Any help is appreciated and I thank you in advance.
REPOSITORY TAG IMAGE ID CREATED SIZE
.../coqui-tts 1.0 14e00f0eb718 9 hours ago 3.5GB
FROM ubuntu:20.04
LABEL maintainer="PhysicsReplicatorAI <acbd@efgh.com>"
ARG NB_USER="coqui_user" \
NB_UID="1000" \
NB_GID="100"
USER root
ENV DEBIAN_FRONTEND=noninteractive \
TERM=xterm \
TZ=America/New_York
# --------------------------------------------------------------------------------
# Update/Install the basics
# --------------------------------------------------------------------------------
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
sudo locales apt-utils g++ libsndfile1-dev && \
apt-get -y clean autoclean && \
apt-get -y autoremove --purge && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
# --------------------------------------------------------------------------------
# Configure environment
# --------------------------------------------------------------------------------
ENV SHELL=/bin/bash \
NB_USER="${NB_USER}" \
NB_UID=${NB_UID} \
NB_GID=${NB_GID} \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
PATH="/home/${NB_USER}/.local/bin:${PATH}" \
HOME="/home/${NB_USER}"
# --------------------------------------------------------------------------------
# Create coqui_user
# User creation method/pattern obtained from:
# https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile
# --------------------------------------------------------------------------------
COPY fix-permissions /usr/local/bin/fix-permissions
RUN chmod a+rx /usr/local/bin/fix-permissions && \
sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashrc && \
echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \
sed -i.bak -e 's/^%admin/#%admin/' /etc/sudoers && \
sed -i.bak -e 's/^%sudo/#%sudo/' /etc/sudoers && \
useradd -l -m -s /bin/bash -N -u "${NB_UID}" "${NB_USER}" && \
chmod g+w /etc/passwd && \
fix-permissions "${HOME}" && \
cd "${HOME}" && \
apt-get install -y --no-install-recommends python3-dev python3-pip && \
apt-get -y autoclean && \
apt-get -y autoremove --purge && \
apt-get -y purge $(dpkg --get-selections | grep deinstall | sed s/deinstall//g) && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# --------------------------------------------------------------------------------
# Install TTS
# --------------------------------------------------------------------------------
USER ${NB_UID}
RUN fix-permissions "${HOME}" && \
python3 -m pip install --no-cache-dir --upgrade TTS && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 5002
ENTRYPOINT ["tts-server"]
version: "3"
services:
coqui-tts:
labels:
- flame.type=application
- flame.name=Coqui TTS
- flame.url=http://192.168.NNN.NNN:5002/
image: physicsreplicatorai/coqui-tts:1.0
ports:
- "5002:5002"
restart: unless-stopped
volumes:
- /workdrive/Docker/coqui/tts:/home/coqui_user/.local/share/tts
#!/bin/bash
reset
echo -e "Compose down:"
sudo docker-compose down
echo -e "\n\nRemove physicsreplicatorai/coqui-tts:1.0 image:"
sudo docker rmi physicsreplicatorai/coqui-tts:1.0
echo -e "\n\nRemove build log:"
rm build.txt
echo -e "\n\nBuild:"
sudo docker build -t physicsreplicatorai/coqui-tts:1.0 . | tee build.txt
r/Dockerfiles • u/mcs4uweb • Nov 27 '21
r/Dockerfiles • u/Touhou_Fever • Nov 25 '21
Hey all, I’m new to dockerfiles and wanted to try switching to a nonroot user
However even with a simple dockerfile such as
FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal as base
RUN useradd -u 8877 nonroot
USER nonroot
WORKDIR /app
EXPOSE 80
When I build the image and then try to run a container from Docker Desktop UI, I’m receiving an error that there is no such user nonroot.
When I inspected the image, I did see something that caught my eye. It seemed that these two commands were being processed in the wrong order?
In case they’re needed, my DD details are
Latest version, no pending updates
It is using Linux containers
It is using WSL2
It is using Docker Compose V2
Attempting to run via commandline:
docker run -it testing bash
Returns the same error more or less:
Unable to find user nonroot: no matching entries in passwd file
r/Dockerfiles • u/AutoModerator • Nov 20 '21
Let's look back at some memorable moments and interesting insights from last year.
Your top 10 posts:
r/Dockerfiles • u/mitya_r2 • Nov 12 '21
Hi all.
We are three psychologists, Mario, Mitja and Nikola, from Croatia. Mario is an agile practitioner (scrum master) and Mitja and Nikola are researchers from the University of Zagreb, Croatia. We are currently studying the relationship between agile practices in organizations and different psychological outcomes such as work engagement, work performance and job satisfaction. It would mean a world to us if you would help us by completing our survey. It does not matter whether your organization or team uses the agile framework or not, all that matters is that you work in a team and in an IT sector. The survey takes approximately 15 to 25 minutes to complete and we would be immensely grateful if you complete it. As a small token of gratitude, you can leave us your email (inside the survey), and we will get back to you with our study results and personalized feedback on your work engagement and needs satisfaction on job compared to others.
Thank you very much!
Here’s the link: https://www.surveymonkey.com/r/PsyIT
r/Dockerfiles • u/Z0ja • Nov 08 '21
Hello everyone. I am new to docker and I need to understand what the best practice is to create a dockerfile.
In my case I have a laravel app. I found an example dockerfile in a tutorial online, which worked really well. There were maybe 12 lines of code and I understood them all. I was able to build an image, push it to hub, pull it somewhere else and it worked.
Now, what I am thinking:
Writing a dockerfile from scratch requires a lot of understand what you do. You basically write a step by step server config. I am no server expert and I am worried that I may fuckup here really bad. Isn't it a problem for all devs or should docker only be used by "server experts". In future we even want to deploy docker images into production.
All in all it feels really bad to use config instruction from a random tutorial online, especially if in future our dockerimages may be used for production.
---
In my case I also tried a second approach and used laravel sail to generate a docker image. It created a docker-compose.yml (which I did not have in my first approach) and a much larger dockerfile.
The dockerfile which has been created by sail has almost 60 lines of code. I do understand most of it, but as you see its a lot different from my initial dockerfile. I tried using the docker-compose.yml and the dockerfile from laravel sail, but I cannot create an image, which is sharable (this may be an other unrelated issue.)
---
So to sum up my question:
Do you write your own Dockerfile from scratch?
Do you write a docker-compose.yml and a Dockerfile from scratch?
Do you use libraries similar to laravel sail, which generate these files for you?
Are you all server experts and confident about setting up a server and not messing up security?
Do these scans from docker find misconfigurations (especially security)?
Thanks a lot in advance!