简体   繁体   中英

Launch Jenkins along with other Container in Docker Image?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM