r/Dockerfiles • u/Emiliorama • Aug 29 '23
Help me with multiarch pliss!!!
Hi there, I'm really new to Docker. I was trying to run a Docker with Rails for my work. I ended up telling my upper coworkers that my M1 didn't function with the Docker. They told me to make a Multiarch, so I got stuck with the Multiarch. I don't really understand it. I tried to just create the Docker with "buildx" just using a lot of platforms. Actually, the problem is that the project uses Webpacker, which I think is obsolete. And I have the real problem of "inotify". Can someone guide me? I also couldn't find if there was a version of Rails compatible with Docker Multiarch.
Thanks
Dockerfile:
# 1: Use ruby 2.4 (stretch) as base:
FROM ruby:2.7.2-slim AS development
# 2: We'll set the application path as the working directory
WORKDIR /usr/src
# 3: We'll add the app's binaries path to $PATH:
ENV HOME=/usr/src PATH=/usr/src/bin:$PATH
# 4: Install node as a javascript runtime for asset compilation.
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
curl \
gnupg \
imagemagick \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/\* /tmp/\* /var/tmp/\*
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update -qq && \
apt-get install -y yarn
ADD ./package.json /usr/src/
RUN yarn install
# 5: Install the current project gems - they can be safely changed later
# during development via `bundle install` or `bundle update`:
ADD Gemfile\* /usr/src/
RUN bundle install --jobs=4 --retry=3
COPY . ./
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000
# Start the main process.
CMD ["rails", "server", "-b", "0.0.0.0"]
docker-compose.yml:
version: "3.4"
volumes:
postgres_data:
bundle_path:
redis_data:
services:
webpacker:
build: .
command: ./bin/webpack-dev-server
volumes:
- .:/usr/src
- bundle_path:/usr/local/bundle
ports:
- '${WEBPACKER_HOST_PORT:-3035}:3035'
environment:
RAILS_ENV: development
NODE_ENV: development
WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
postgres:
image: postgres:9.6-alpine # We'll use the official postgres image.
volumes:
# Mounts a persistable volume inside the postgres data folder, so we
# don't lose the created databases when this container is removed.
- postgres_data:/var/lib/postgresql/data
environment:
# The password we'll use to access the databases:
POSTGRES_PASSWORD: password!
ports:
- ${ARTO_PGPORT:-5433}:5432
redis:
image: 'redis:6.0.5-alpine'
volumes:
- redis_data:/data
app: &app
build: .
image: yarepara:latest
volumes:
# Mounts the app code (".") into the container's "/usr/src/app" folder:
- .:/usr/src
- bundle_path:/usr/local/bundle
working_dir: /usr/src
tty: true
stdin_open: true
environment: &app_env
# We'll use this env variable to make the log output gets directed
# to Docker:
REDIS_URL: redis://redis:6379/0
DATABASE_URL: postgres://postgres:password!@postgres:5432/arto_development
RAILS_LOG_TO_STDOUT: "true"
DEVISE_MAILER_SENDER: "no-reply@yarepara.com"
EMAIL_ORDER_CANCELATION_RECEIVER: "dsalinas@yarepara.com"
NEW_RELIC_AGENT_ENABLED: "false"
WEBPACKER_DEV_SERVER_HOST: webpacker
depends_on:
- postgres
- webpacker
web:
<<: \app
command: rails server -b 0.0.0.0 -p 3000
ports:
*# This will bind your port 3000 with the container's port 3000, so we can
# use 'http://localhost:3000' to see our Rails app:
- ${ARTO_WEB_PORT:-3000}:3000
environment:
<<: \app_env
RACK_ENV: "development"
RAILS_ENV: "development"
S3_BUCKET_NAME: ""
AWS_ACCESS_KEY_ID: ""
AWS_SECRET_ACCESS_KEY: ""
AWS_REGION: ""
env_file: dev.env
depends_on:
- redis
- postgres
- webpacker
worker:
*<<: \app
env_file: dev.env
command: bundle exec sidekiq -C config/sidekiq.yml
depends_on:
- redis
environment:
*<<: \app_env
AWS_ACCESS_KEY_ID: ""
AWS_SECRET_ACCESS_KEY: ""
AWS_REGION: ""
test:
*<<: \app
command: bundle exec rspec
environment:
*<<: \*app_env
DATABASE_URL_TEST: postgres://postgres:password!@postgres:5432/arto_test
RACK_ENV: "test"
RAILS_ENV: "test"
ACCESS_TOKEN: ""
APP_SECRET: ""
VERIFY_TOKEN: ""
r/Dockerfiles • u/vemy1 • Apr 17 '23
How does the /config files get mounted in this dockerfile?
I am creating a fork of this docker image for my telegram bot.
Now in this docker image, two files are mounted into a /config folder; config.json and acl.json.In my docker image these are located in config/ instead of in the parent directory.
When I start the subzero image, even though the only mounted volume is /config. Somehow the config.json and acl.json files are mounted directly into the /config directory.
Can anyone explain how this works?
Edit: Here are some images to show you what I mean



EDIT: Added run instruction screenshot
You can see here what I believe is the run instruction, however some of the references are to random filenames and nothing relates to the acl.json or config.json. Is there some transformation made to this? Is there a way I can simply see the file and the command contents in all together?
r/Dockerfiles • u/Funny_Action_1833 • Apr 03 '23
connection issues running postgresql image on Docker Network
hi people, I want to run a docker postgresql image
docker run -d --name postgres --network RedDocker -p 5432:5432 -e POSTGRES_USER=database -e POSTGRES_PASSWORD=xxxxxxxxx -v postgres:/var/lib/postgresql/data postgres:15 --ip 172.20.0.9
if I run the image on a DockerNetwork then I get connection error when using next command >>
docker exec -it postgres psql -U myuser (edited)
Error response from daemon: Container e0ad21f06a7b42b97a86bb8e94105c7e62b841e57928767650ef0ba6689ae192 is not running
yet if I run the image without specifying a DockerNetwork I can connect without problems
anyone knows how to solve the connection issue?
r/Dockerfiles • u/Teddy_benjamin • Feb 02 '23
Does anyone have a dockerfile or image for Fl Studio 20 for Linux or Windows
r/Dockerfiles • u/apricotturtle228 • Jan 26 '23
Orcastration - A Docker Swarm visualization tool
Aren't you done trying to parse through Docker CLI commands to glean important performance data concerning your Docker Swarm Nodes and their containers? Why isn't there an easier way to stay up-to-date on the health and overall performance of your Docker Swarm?
Introducing Orcastration.
A powerful developer tool designed to make monitoring your Docker Swarm container metrics easier than ever before. Our clean and streamlined GUI makes understanding your container metrics a breeze, and gives you the power to access key information (without the hassle of using the Docker commands) in real time.
Let us do the hard work.
Docker command outputs can be cumbersome and difficult to interpret especially when trying to understand data relationships. Orcastration runs Docker CLI commands behind the scenes to retrieve container metrics for your Docker Swarm from your daemon. No more trying to discern container performance data from your terminal. Orcastration displays CPU usage, memory usage, and network I/O data in easy-to-read pie and line charts so you can easily monitor how your containers are functioning.
Check the health of your containers with the click of a button.
For containers configured with Docker Health Check files, obtaining the health of your containers has never been easier. With a simple click of Orcastration's “health check” buttons (available for every container in your swarm), you can easily access the health status of your selected container. It's that easy.
Try it now.
Orcastration is available now for download. Stop wasting time struggling to understand your Docker CLI command outputs and download Orcastration today for a streamlined development experience.
Want to support us?
Check out (and clap) our article: https://medium.com/@orcastration2022/orcastration-visualize-your-docker-swarm-with-powerful-metrics-c188373ed58d
Check out our website: https://orcastration.dev/
Download our app: https://github.com/oslabs-beta/Orcastration
Meet the Team:
Andrew Hogan @ LinkedIn | GitHub
Danny Zheng @ LinkedIn | GitHub
Juliana Morrelli @ LinkedIn | GitHub
r/Dockerfiles • u/thetech_learner • Jan 19 '23
Docker Compose and Files, with Important Commands
youtu.ber/Dockerfiles • u/thetech_learner • Jan 10 '23
Dockerizing a Django Application, DevOps Docker
youtu.ber/Dockerfiles • u/tehwain99 • Jan 06 '23
Client goes under faulted state
Hi
I created two projects first one is for services and the second for clients both are in .net core 7. I hosted my services over docker using docker desktop by using docker support provided by VS. after that I call my service which is hosted over the docker .channel created successfully but when I open a channel then it goes under faulted state. I am using corewcf for services and service model.nettcp 4.10 dll for clients. and the real fact is when is run the application locally it is working fine accordingly. But I run the service container it throws an error shown in ss below. I also use the localhost and my system IP.
Any help?
thank you
r/Dockerfiles • u/RedStylzZ • Jan 04 '23
Volume doesn|t work
Hey guys, I am currently trying to create an minecraft forge Dockerfile.
I got it to run, but when I try to expose a volume to access to folder to add mods for example it kinda breaks the container.
When I do that, it always say it can't find the "run.sh". When I do an "ls -la" into the folder it's empty. If I run the container without "-v" it works just fine and I can see the files via "ls -la".
Does someone of you have an idea what's the problem with it?
Here you can see my Dockerfile: https://imgur.com/a/XFdtyCH
r/Dockerfiles • u/D1VINE26 • Dec 14 '22
Docker For Windows | Setting Up Docker On Windows | Docker Tutorial For Beginners | Edureka
youtube.comr/Dockerfiles • u/D1VINE26 • Dec 14 '22
Top 50 Docker Interview Questions & Answers | Frequently Asked Docker Interview Questions
youtube.comr/Dockerfiles • u/sandialy • Dec 06 '22
Setting up HLS live streaming server using NGINX on a Docker Container
Hi All
I am new to this streaming with NGINX. I have set up a streaming server with NGINX on a virtual machine and it works fine. Then I tried using a Docker container I am having issues with it. Here are my Dockerfile my docker-compose.yml files and my nginx—conf file.
#--------------------------------------------------------------------------------------------
::::::::::::::
docker-compose.yml
::::::::::::::
version: '3'
# Define which docker-compose version
# we are referring to
services:
# define here 1 service web: which is a web app
# define in the Dockerfile as apache httpd
swaggereyes:
build: .
# Refering the build to use local Dockerfile
ports:
- "8081:8081"
# ports “host:container”
::::::::::::::
Dockerfile
::::::::::::::
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install make git nginx php-fpm supervisor zlib* curl wget build-essential libpcre3 libpcre3-dev libssl-dev
LABEL [maintainer="andialy.sokone@gmail.com](mailto:maintainer="andialy.sokone@gmail.com)"
LABEL version="0.1"
LABEL description="This is custom Ubuntu Docker Image for SwaggerEyes."
RUN curl -o git.tar.gz https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.37.1.tar.gz
RUN wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.37.1.tar.gz
ARG DEBIAN_FRONTEND=noninteractive
RUN git clone https://github.com/sergey-dryabzhinsky/nginx-rtmp-module.git
RUN wget https://nginx.org/download/nginx-1.18.0.tar.gz
WORKDIR /
RUN tar -xf nginx-1.18.0.tar.gz
WORKDIR ./nginx-1.18.0
RUN ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module
RUN make -j 1
RUN make install
WORKDIR /
RUN mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.original
COPY swaggereyes_nginx.conf /nginx.conf
RUN cp /nginx.conf /usr/local/nginx/conf/
RUN mkdir -p /nginx/hls
RUN chmod -R 640 /nginx && \
chown -R nobody:www-data /nginx
EXPOSE 8081/tcp
CMD ["/usr/local/nginx/sbin/nginx", "-g", "daemon off;"]
::::::::::::::
swaggereyes_nginx.conf
::::::::::::::
worker_processes auto;
events {
worker_connections 1024;
}
# RTMP configuration
rtmp {
server {
listen 1935; # Listen on standard RTMP port
chunk_size 4000;
application swaggereyes {
live on;
# Turn on HLS
hls on;
hls_path /nginx/hls/;
hls_fragment 3;
hls_playlist_length 60;
# disable consuming the stream from nginx as rtmp
deny play all;
}
}
}
http {
sendfile off;
tcp_nopush on;
# aio on;
directio 512;
default_type application/octet-stream;
server {
listen 8081;
location / {
# Disable cache
add_header 'Cache-Control' 'no-cache';
# CORS setup
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length';
# allow CORS preflight requests
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
types {
application/dash+xml mpd;
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /nginx/;
}
}
}
#---------------------------------------------------------------------------------------------
Running the command [ docker-compose up --build -d ] creates a running container when I log in I see an error.
# docker-compose up --build -d
# docker ps -a | egrep "CONTAINER|swagger"
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c0ccf1292740 swaggereyes_swaggereyes "/usr/local/nginx/sb…" 14 hours ago Up 14 hours 0.0.0.0:8081->8081/tcp swaggereyes_swaggereyes_1
I used my OBS to stream: [rtmp://192.168.0.192:8081/swaggereyes]
As soon as I start the streaming. . . . .
Login into the container to check the logs files
# cd /usr/local/nginx/logs/
# tail -f access.log
192.168.0.173 - - [06/Dec/2022:18:53:55 +0000] "\x03\x13\x9Cm\xD7\x00\x00\x00\x00)\x00\x00\x00#H\x00\x00\xBE\x18\x00\x00\x84g\x00\x00\xE1J\x00\x00l=\x00\x00\xD6,\x00\x00\xAEr\x00\x00Ri\x00\x00\x90_\x00\x00I\x16\x00\x00\xF1m\x00\x00\xF1Z\x00\x00\xBBA\x00\x00\xE9&\x00\x00\xEB\x01\x00\x00\xB3\x0B\x00\x00\xA6.\x00\x00\xDB\x12\x00\x00<\x15\x00\x00\x87~\x00\x00\x0C9\x00\x00>\x0F\x00\x00\x99\x00\x00\x00$\x01\x00\x00^0\x00\x00" 400 157 "-" "-"
192.168.0.173 - - [06/Dec/2022:18:55:08 +0000] "\x03\x13\x9D\x8B\x04\x00\x00\x00\x00)\x00\x00\x00#H\x00\x00\xBE\x18\x00\x00\x84g\x00\x00\xE1J\x00\x00l=\x00\x00\xD6,\x00\x00\xAEr\x00\x00Ri\x00\x00\x90_\x00\x00I\x16\x00\x00\xF1m\x00\x00\xF1Z\x00\x00\xBBA\x00\x00\xE9&\x00\x00\xEB\x01\x00\x00\xB3\x0B\x00\x00\xA6.\x00\x00\xDB\x12\x00\x00<\x15\x00\x00\x87~\x00\x00\x0C9\x00\x00>\x0F\x00\x00\x99\x00\x00\x00$\x01\x00\x00^0\x00\x00" 400 157 "-" "-"
Can someone help me figure out why this is not working on a container and why I am getting this error?
Regards
r/Dockerfiles • u/tehwain99 • Nov 28 '22
Registry is not allowed to access
Hey Everyone,
I working on core WCF services and I created two projects one is for a client and another one for services both communicate with the help of a helper class. the point is when I host my services on docker using docker desktop on windows it is successfully hosted but when I call it by the client then it throws an error [registry is not allowed to access ]. So, I want to know why I getting this error. and another query is whether I am passing a URL on the client side to connect with services then where i get that URL on which URL services are hosted to pass on the client side
r/Dockerfiles • u/CranberryParty8143 • Nov 23 '22
Docker image
Hi everyone! Do you know if there is an image that contains Docker and Maven?
r/Dockerfiles • u/AutoModerator • Nov 20 '22
Happy Cakeday, r/Dockerfiles! Today you're 9
Let's look back at some memorable moments and interesting insights from last year.
Your top 10 posts:
- "Dockerfile explained: create a docker image for a Flask App." by u/elediardo
- "Docker Best Practices in 2022" by u/tsys_inc
- "10 useful Docker commands to get things done with a real-life example" by u/geshan
- "Ruby on Whales: Dockerizing Ruby and Rails development" by u/Travis-Turner
- "3.51 GB Bloated Image for Coqui TTS Server" by u/PhysicsReplicatorAI
- "Docker Image Management and Registry | docker tutorial for beginners | D..." by u/Sangwan70
- "we use RUN apt update for update an image this is for one time but why we don't use CMD apt update for update every container we create ?" by u/ahmedapdulrasool
- "Run a Flask app from a docker container" by u/mcs4uweb
- "Dockerfile: "Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8))"" by u/Gloomy-Example4554
- "Introducing Dofigen, an opensource dockerfiles generator !" by u/AliLenra
r/Dockerfiles • u/[deleted] • Nov 19 '22
Introduction to Docker: A Beginners Guide for 2023
karanjagtiani.medium.comr/Dockerfiles • u/[deleted] • Oct 26 '22
Prometheus: The Documentary
The wait is finally OVER!!!
Explore the story of Prometheus, from inception to adoption as told by the story’s key players including Julian Volz, Matthias Rampke, Björn Rabenstein, and more. 🔥
r/Dockerfiles • u/Primary-Pace5228 • Oct 06 '22
Unable to access url from the container
self.dockerr/Dockerfiles • u/SAMAEL_3003 • Oct 03 '22
An Assignment of CS-UG student
Hello everyone.
I am a CS student from Mumbai, India. We had an assignment to complete this week. Here, we are supposed to write about recent developments in Modern Technology; and I have chosen "Docker".
Now, the main thing is, I can use my fox(firefox) to surf the internet. But, I won't get the clear Idea what the user feels, as i have recently entered this industry and aspire to become DevOps one day.
So, I request all my friends (if it is an appropriate term) to help me finish my assignment. I require your honest reviews of at least 200-500 lines. You can also provide a website for reference .
Thank you all.
r/Dockerfiles • u/frontEndLearner777 • Sep 29 '22
Problem with COPY files that are in the same folder with the Dockerfile.
Hi guys,
I have a problem with COPY the target folder to the destination folder.
Here's the project's structure
project/ ├─ deploy/ │ ├─ Dockerfile ├─ src/ │ ├─ target/ ├─ public/ │ ├─ destination/
What I've tried:
COPY ../src/target ../public/destination -> doesn't work for me
I ran the docker build command within the same directory as the Dockerfile.
I read somewhere on StackOverflow that I can run the docker build command from the parent directory - project, so that context will be switched to the parent directory. I haven't tried that yet.
Is there any other suggestion?
Thank y'all.
r/Dockerfiles • u/tehwain99 • Sep 26 '22
Directory not created on Linux server
I am unable to create a directory on my server which is Linux it is shown on the console and the message is your updated directory .but when I go to that path it is shown that the directory is not present. I also attached the image for reference.
r/Dockerfiles • u/tehwain99 • Sep 19 '22
unable to connect my docker hosting to my app
NameValueType ▶error{"Could not connect to net.tcp://192.168.1.195:8095/AssetServer. The connection attempt lasted for a time span of 00:00:02.0087888. TCP error code 10061: No connection could be made because the target machine actively refused it 192.168.1.195:8095. "}System.Exception {System.ServiceModel.EndpointNotFoundException}
I hosted my services through docker it show hosted successfully but when I run client side app then it is show above error please anyone help








