1

I have just started to learn Docker. I have tried to run jenkins in my docker.

I have tried the commands: docker run jenkins , docker run jenkins:latest

But showing the error in the docker interactive shell: C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: manifest for jenkins:latest not found: manifest unknown: manifest unknown.

  • The answer to this question is the same as described in an older post dealing with the same error message. https://stackoverflow.com/a/63474733/6710366 – André Carvalho Jan 10 '23 at 16:34

1 Answers1

3

You can run the container by using the command

docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts

The documentation page is pretty good.

I would use a docker-compose file to

  • mount a volume for home to make it persistent (in order to look into the build workspace you need to attach another container to it)
  • control the version programmatically
  • add docker client or other utilities installed later
  • add 'fixed' agents

docker compose file:

version: '3.5'
services:
  jenkins-server:
    build: ./JenkinsServer
    container_name: jenkins
    restart: always
    environment:
      JAVA_OPTS: "-Xmx1024m"
    ports:
      - "50000:50000"
      - "8080:8080"
    networks:
      jenkins:
        aliases:
          - jenkins
    volumes:
      - jenkins-data:/var/jenkins_home

networks:
  jenkins:
    external: true

volumes:
  jenkins-data:
    external: true

dockerfile for server:

FROM jenkins/jenkins:2.263.2-lts
USER root
TudorIftimie
  • 1,050
  • 11
  • 21