0

I want to reduce cost by launching jenkins within other container but jenkins is not launching along with other container

FROM ubuntu:20.04
FROM jenkins/jenkins:lts
USER root

FROM python:3.10

...................
...................
...................


ENTRYPOINT [ "python", "./automatic_trigger/script.py" ]

I have used following command to launch the container

docker build -t trigger -p 8080:8080 .

  • Only the last FROM line has an effect; you are building a Python image without Jenkins. Also see for example [Multiple FROMs - what it means](https://stackoverflow.com/questions/33322103/multiple-froms-what-it-means). A container is just a wrapper around a single process, and I'd expect two separate containers to have about the same CPU, memory, and disk requirements as the processes involved. – David Maze Dec 15 '22 at 11:56

1 Answers1

0

Reduce cost of what exactly?

The best way is to have your applications containers separated, i recommend you to use docker-compose

services:
  jenkins:
    image: jenkins/jenkins:lts

  app1:
    image: yourimage

then run docker compose up and you will have to small containers running.