Code Snippets Dockerfile

Short texts Dockerfile 🧑‍💻 Code snippets Dockerfile ✍️ Reading lists Dockerfile 👀

Dockerfile for spigotmc using openjdk

FROM openjdk:17-oraclelinux8 # Environement ENV MAX_MEM=6G ENV MIN_MEM=2G ARG MC_VERSION=1.17.1 ARG MC_PORT=25565 ARG RCON_PORT=25575 # Build Spigot WORKDIR /buildtools COPY ./BuildTools.jar /buildtools/ RUN [ “microdnf”, “install”, “git”, “wget”] RUN [ “wget”, “https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar”] RUN java -jar ./BuildTools.jar –rev $MC_VERSION -o ./build # Create the Server WORKDIR /server RUN cp /buildtools/build/*.jar /server/spigot.jar # RCON Server Port EXPOSE […]

firstapp.Dockerfile

FROM python:alpine RUN pip install flask COPY . /app WORKDIR /app EXPOSE 3000 CMD python ./app.py

second.Dockerfile

FROM python:alpine RUN pip install flask COPY . /app WORKDIR /app EXPOSE 4000 CMD python ./app.py

docker image with user creation for kube users

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 WORKDIR /app # Create a user group ‘xyzgroup’ RUN addgroup –force-badname 10000 # Create a user for /app dir RUN adduser -D -h /app 10000 10000 # Chown all the files to the app user. RUN chown -R 10000:10000 /app COPY –from=build-env /app/out . ENV ASPNETCORE_URLS=http://*:8080 ENTRYPOINT [ “dotnet”, “application.dll” ]

Dockerfile

# Base image FROM php:5.6-apache # Create web folder RUN mkdir /var/www/html/website # Copy config files into the container COPY ./conf/website.conf /etc/apache2/sites-available/website.conf COPY ./conf/php.ini /usr/local/etc/php/ # Setting ServerName to avoid “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName” warning RUN echo “ServerName localhost” | tee /etc/apache2/conf-available/servername.conf RUN a2enconf servername […]