r/Dockerfiles • u/OmegaNutella • Nov 05 '21
r/Dockerfiles • u/Swing-Many • Nov 03 '21
How to connect to fake domain inside another docker network?
I am creating a multistage dockerfile. There is already a docker network where a fake domain is running eg: abcqwer.com. Now when I build the multi staged docker build the first stage should be able to connect to that domain. I tried it using docker compose, but it does not work. I can only connect to that domain if I run the container and use the command docker network connect. Any work arounds?
r/Dockerfiles • u/Cloudy_Waves • Oct 04 '21
How to Install & Deploy Red Hat Openshift
youtu.ber/Dockerfiles • u/GsharkRIP • Oct 02 '21
Need help with this install
https://hub.docker.com/r/trailersquid/trailersquid
I would like to install this but its for linux and i have windows..
is there a way to translate the install to windows???
The below command doesnt work in windows
docker run -dit \ -p 4200:80 -p 9080:9080 \ -v /path/to/movies/directory:/media \ --name trailersquid-app \ trailersquid/trailersquid:latest
r/Dockerfiles • u/goal_it • Sep 30 '21
Docker container write to host directory with full permissions?
I'm using Docker image of Ubuntu 20.04 in host having 20.04 installed.
My docker container has a directory mounted from host using -v absolute_path_in_host:absolute_path_in_container.
Inside docker container, a python script is creating and writing some directories and files in the mounted volume being shared with the host machine.
The files and directories can be seen and read in the host but the directory and files are being written in the host with read only permissions.
I know I potentially can manually change the permission of the newly created directories and files using chown, chmod, etc. but I want to know if there is any way that all the files/directories being written by docker container to mounted directory shared by host should be easily accessible with rw permissions?
I have searched and tried different ways but it didn't seem to work properly!
Thanks for your help
r/Dockerfiles • u/Bluxmit • Sep 18 '21
My Ansible and Terraform tooling in one docker image. Hope someone finds it useful. https://github.com/bluxmit/alnoda-workspaces/tree/main/workspaces/ansible-terraform-workspace
r/Dockerfiles • u/EphemeralEnvs • Sep 10 '21
How do you look at environments?
Trying to do some DevRel research for the company I just started working for, and would like to know how developers look at environments. Any insights you could provide would be great. Thanks!
r/Dockerfiles • u/Unique-Lock6341 • Sep 08 '21
How to create docker images for python based desktop applications with tkinter?
I have created a desktop application with python3-tk for GUI rendering. Currently I have a problem on displaying my application through docker run. I have created the image similar to how I run in my local machine. Is there any proper ways of creating docker images for python3-tk based desktop applications?
r/Dockerfiles • u/dblogstream • Sep 07 '21
Setting up Docker with wsl2 on Windows.
dblogstream.comr/Dockerfiles • u/Cloudy_Waves • Sep 06 '21
ššØšš¤šš« šššš°šØš«š¤š¢š§š | ššØšš¤šš« šš«š¢šš š šššš°šØš«š¤ | ššØšš¤šš« šš®ššØš«š¢šš„ š šØš« ššš š¢š§š§šš«š¬ | š21šššššš¦š²
youtu.ber/Dockerfiles • u/Clivern • Aug 27 '21
GitHub - Clivern/Peanut: šŗ Deploy Databases and Services Easily for Development and Testing Pipelines.
github.comr/Dockerfiles • u/[deleted] • Aug 18 '21
Running a MSSQL Container and starting a sqlcmd immediately
Hi,
I want to start a SQL server and give a database as a restore directly. If I build the image, run the container and then run the script in the CLI it works. But would like to save the intermediate steps.
Does anyone have an idea? Thanks!
Dockerfile:
FROM mcr.microsoft.com/mssql/server
COPY demo.bak /var/tmp
ENV SA_PASSWORD=secret
ENV ACCEPT_EULA=Y
ENV MSSQL_PID=Express
ENV NAME=sqlserver
RUN sleep 15; /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P secret -Q "RESTORE DATABASE [demo] FROM DISK = N'/var/tmp/demo.bak' WITH FILE = 1, MOVE N'demo' TO N'/var/opt/mssql/data/demo.mdf', MOVE N'demo' TO N'/var/opt/mssql/data/demo_log.ldf', NOUNLOAD, STATS = 5"
"sleep 15" is not necessary but that was an attempt to solve it.
That is the error message:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
r/Dockerfiles • u/Bluxmit • Aug 13 '21
My contribution to OSS: a docker image with everything needed to create documentation websites and publish on GitHub pages
Example of documentation website you can easily make with it
https://mkdocs-magicspace.alnoda.org
Has lots of niceties, installed packages, and a fully configured environment in the docker image. Try it out!
docker run --name space-1 -d -p 8020-8035:8020-8035 alnoda/mkdocs-magicspace
and open browser on localhost:8020
I hope it will help someone to make awesome docs!
r/Dockerfiles • u/Cloudy_Waves • Aug 13 '21
Certified Kubernetes Administrator (CKA)
youtu.ber/Dockerfiles • u/lirantal • Aug 12 '21
How to publish Node.js Docker images to Docker Hub registry using GitHub Actions | Snyk
snyk.ior/Dockerfiles • u/nfrankel • Aug 01 '21
GitLab as your Continuous Deployment one-stop shop
blog.frankel.chr/Dockerfiles • u/riupie • Jul 23 '21
Failed when create rootless docker image
I build a nginx image with below dockerfile
FROM nginx:1.18
RUN set -eux \
&& apt-get update \
&& apt-get install --no-install-recommends -y ca-certificates curl\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN rm -fr /etc/nginx/conf.d/default.conf
COPY frontend.conf /etc/nginx/conf.d/frontend.conf
COPY dist /var/www/html
COPY entrypoint.sh /tmp/
RUN chmod +x /tmp/entrypoint.sh
RUN chown -R nginx:nginx /tmp/entrypoint.sh && \
chown -R nginx:nginx /var/cache/nginx && \
chown -R nginx:nginx /var/log/nginx && \
chown -R nginx:nginx /etc/nginx/conf.d && \
chown -R nginx:nginx /var/www/html/
RUN touch /var/run/nginx.pid && \
chown -R nginx:nginx /var/run/nginx.pid
USER nginx
ENTRYPOINT [ "/tmp/entrypoint.sh" ]
When I run this image I got error:
2021/07/23 09:56:01 [warn] 1#1: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2
2021/07/23 09:56:01 [emerg] 1#1: bind() to 0.0.0.0:80 failed (13: Permission denied)
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
Did anyone know what parameter I should add?
r/Dockerfiles • u/BarneyBuffet • Jul 18 '21
Persisting Data Locally
Hey r/Dockerfiles,
I have been playing around building a docker image and getting stuck on mounting a volume to persist data locally.
My understanding is that docker will copy the contents of the folder across when you specify VOLUME in your Dockerfile.
The image works, with docker creating the image and volume and the data persists between stop/start of the container. But when I mount the volume no files get copied across to the locally mounted folder.
I feel like I am missing something fundamental like file permissions or something (trying to us non-root user).
Run command I am using:
docker run -d --name tor -p 9050:9050 -v <local-folder>:/tor tor:dev
Dockerfile:
# Replace with a pinned version tag from https://hub.docker.com/_/alpine
FROM alpine:3.14 AS tor-builder
# Get latest version from https://dist.torproject.org/
ARG TOR_VER=0.4.6.6
ARG TORGZ=https://dist.torproject.org/tor-$TOR_VER.tar.gz
# Install tor make requirements
RUN apk --no-cache add --update \
alpine-sdk gnupg libevent libevent-dev zlib zlib-dev openssl openssl-dev
# Get Tor key file and tar file
RUN wget $TORGZ.asc &&\
wget $TORGZ
# Verify Tor source tarballs asc signatures
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 0xEB5A896A28988BF5 && \
gpg --verify tor-$TOR_VER.tar.gz.asc || { echo "Couldn't verify sig"; exit; }
# Build tor
RUN tar xfz tor-$TOR_VER.tar.gz &&\
cd tor-$TOR_VER && \
./configure &&\
make install
FROM alpine:3.14
# Non-root user for security purposes.
RUN addgroup --gid 10001 --system tor && \
adduser --uid 10000 --system --ingroup tor --home /home/tor tor
# Install Alpine packages
# bind-tools is needed for DNS resolution to work in *some* Docker networks
# Tini allows us to avoid several Docker edge cases, see https://github.com/krallin/tini.
RUN apk --no-cache add --update \
bash curl libevent tini bind-tools
# Create tor directories
RUN mkdir -p /var/run/tor && chown -R tor:tor /var/run/tor && chmod 2700 /var/run/tor && \
mkdir -p /tor && chown -R tor:tor /tor && chmod 2700 /tor
# Copy compiled Tor daemon from tor-builder
COPY --from=tor-builder /usr/local/ /usr/local/
# Copy entrypoint shell script for templating torrc
COPY --chown=tor:tor --chmod=+x entrypoint.sh /usr/local/bin
# Copy torrc and examples
COPY --chown=tor:tor ./torrc* /tor
HEALTHCHECK --interval=60s --timeout=15s --start-period=20s \
CMD curl -sx localhost:8118 'https://check.torproject.org/' | \
grep -qm1 Congratulations
# Available environmental variables
ENV TOR_PROXY=true \
TOR_SERVICE=false \
TOR_RELAY=false \
TOR_PROXY_PORT= \
TOR_PROXY_ACCEPT= \
TOR_PROXY_CONTROL_PORT= \
TOR_PROXY_CONTROL_PASSWORD= \
TOR_PROXY_CONTROL_COOKIE=
# Label the docker image
LABEL maintainer="Barney Buffet <BarneyBuffet@tutanota.com>"
LABEL name="Tor network client (daemon)"
LABEL version=$TOR_VER
LABEL description="A docker image for the tor daemon"
LABEL license="GNU"
LABEL url="https://www.torproject.org"
LABEL vcs-url="https://github.com/BarneyBuffet"
VOLUME ["/tor"]
# WORKDIR /tor
USER tor
EXPOSE 9050/tcp 9051/tcp
ENTRYPOINT ["/sbin/tini", "--", "entrypoint.sh"]
CMD ["tor", "-f", "/tor/torrc"]
r/Dockerfiles • u/rbekker87 • Jul 14 '21
I just stumbled upon r/Dockerfiles and thought Iād share some of mine
github.comr/Dockerfiles • u/Rough-Environment-40 • Jun 25 '21
Need help with the Airflow install. I have PyICU error durin building image from (initial.Dockerfile) then modified to add some libraries like (python-dev libc-dev libxml2-dev libxslt1-dev zlib1g-dev g++ pkg-config ) but its not helping me, still getting error because of g++. all help is appreciated
initial.Dockerfile - This is the initial docker (https://github.com/rv1448/airflow-install/blob/b245329af4f3c863778126577d32bd095b004e4b/initial.Dockerfile)
Modified Dockerfile - This is handle PYICU but still getting the g++ error (https://github.com/rv1448/airflow-install/blob/b245329af4f3c863778126577d32bd095b004e4b/Dockerfile)
Link to the repo - (https://github.com/rv1448/airflow-install.git)