Skip to content

Instantly share code, notes, and snippets.

View anjilinux's full-sized avatar
💭
Hi this is ANJIREDDY

ANJIREDDY -Architect - AI-ML [ BNYMELLON.COM -PUNE] anjilinux

💭
Hi this is ANJIREDDY
View GitHub Profile
@anjilinux
anjilinux / Dockerfile
Created July 7, 2025 16:10
Docker + Pytorch + Python3.11.6 + Poetry environment
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=all
ENV DEBIAN_FRONTEND=noninteractive
# configure locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
@anjilinux
anjilinux / Dockerfile
Created April 6, 2024 13:52 — forked from nandanrao/Dockerfile
Multi-stage build Dockerfile for Go and Kafka with confluent-kafka-go and Alpine
FROM golang:alpine AS build
RUN sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories
RUN apk upgrade --update-cache --available
RUN apk add --no-cache \
gcc \
libc-dev \
librdkafka-dev=1.3.0-r0 \
pkgconf
RUN mkdir /app
WORKDIR /app
@anjilinux
anjilinux / Dockerfile
Created March 28, 2024 04:40 — forked from clintval/Dockerfile
Bioinformatics example of a multi-stage Dockerfile
# syntax=docker/dockerfile:1.3
FROM openjdk:8-slim-buster AS builder
RUN apt-get update && apt-get install -y git
# Not actually needed by any subsequent commands, but shows how you can bake
# things into the builder layer if they are commonly needed by other layers.
RUN mkdir -p -m 0600 ~/.ssh \
&& ssh-keyscan github.com >> ~/.ssh/known_hosts
@anjilinux
anjilinux / Dockerfile.go.build
Created March 27, 2024 12:12 — forked from wwerner/Dockerfile.go.build
Example multi stage docker file for go builds
FROM golang:1.11.2 as build-image
WORKDIR /go/src
RUN go get -d -v golang.org/x/net/html
COPY app.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app app.go
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=build-image /go/src/app .
@anjilinux
anjilinux / Dockerfile
Created March 27, 2024 12:08 — forked from shumbashi/Dockerfile
project Dockerfile multi-stage example for JS/PHP App
###############################################################################
# Step 1 : NPM Builder image
#
FROM node:lts-alpine AS npm-builder
# Define working directory and copy source
WORKDIR /home/node/app
COPY ./my_app/package.json ./my_app/modernizr-config.json ./
# Install dependencies and build whatever you have to build
RUN apk add --no-cache git
---
# tasks file for master
- name: Add repository for kubeadm
yum_repository:
name: Kubernetes
description: YUM repo for kubeadm
baseurl: https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch
enabled: yes
gpgcheck: no
# Build Stage for Spring boot application image
FROM openjdk:8-jdk-alpine as build
WORKDIR /app
COPY mvnw .
COPY .mvn .mvn
COPY pom.xml .
RUN chmod +x ./mvnw
@anjilinux
anjilinux / Dockerfile
Created April 16, 2023 12:33 — forked from javajack/Dockerfile
Dockerfile for multistage build of spring boot application using maven with SonarQube and proxy support https://blog.pavelsklenar.com/spring-boot-run-and-build-in-docker/
### BUILD image
FROM maven:3-jdk-11 as builder
#Copy Custom Maven settings
#COPY settings.xml /root/.m2/
# create app folder for sources
RUN mkdir -p /build
WORKDIR /build
COPY pom.xml /build
#Download all required dependencies into one layer
RUN mvn -B dependency:resolve dependency:resolve-plugins
@anjilinux
anjilinux / Docker-multistage-example.MD
Created April 16, 2023 12:17 — forked from liemle3893/Docker-multistage-example.MD
Docker Multistage + Spring Boot = Smaller Container Sized

docker-multi-stage

Spring Boot + Docker Multistage = Smaller container size

Use can use prebuild version by using:

$ docker run -d -p 8080:8080 saboteurkid/smaller-spring:1.0

Wait for docker to pull and up. Then jump to step #6

1. Clone example project from Spring Boot repository

@anjilinux
anjilinux / Dockerfile
Created April 16, 2023 12:15 — forked from shinyay/Dockerfile
MultiStage-Build Dockerfile for Spring Boot
FROM gradle:5.4.1-jdk8-alpine AS build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle build --no-daemon
FROM openjdk:8-jre-alpine
EXPOSE 8080
RUN mkdir /app
COPY --from=build /home/gradle/src/build/libs/*.jar /app/spring-boot-application.jar
ENTRYPOINT ["java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Djava.security.egd=file:/dev/./urandom","-jar","/app/spring-boot-application.jar"]