Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
FROM jenkins/jenkins:lts ARG HOST_UID=1001 ARG HOST_GID=999 USER root RUN apt-get -y update && \ apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \ $(lsb_release -cs) \ stable" && \ apt-get update && \ apt-get -y install docker-ce docker-ce-cli containerd.io RUN curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ chmod +x /usr/local/bin/docker-compose && \ ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose RUN curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh RUN bash nodesource_setup.sh RUN apt install nodejs RUN usermod -u $HOST_UID jenkins RUN groupmod -g $HOST_GID docker RUN usermod -aG docker jenkins USER jenkins
Look into Kaniko as an alternate way to build containers. It is more secure and will work fine with the method I suggested above and you won't need to do docker in docker.
Related posts
- Hosting a simple docker-compose app with Nginx and generate a SSL with certbot on digitalocean droplet
- How to Set Up a Docker Container
- Use same Dockerfile for Dev & Production
- How to Dockerise a NodeJS - TypeScript API || A Comprehensive Guide from Environment Setup to Deployment with a CI/CD Pipeline
- Deploy a MongoDB Cluster With Docker Compose