docker-compose.yml
# java
version: '3'
services:
java-web-server:
image: openjdk:11-jre
container_name: 'java-web-server'
ports:
- "8083:8080"
volumes:
- './app:/app'
working_dir: /app
command: java -jar -Dspring.profiles.active=local app.jar
# jenkins
version: '3'
services:
jenkins:
build:
context: .
container_name: 'jenkins'
image: jenkins/jenkins:lts
ports:
- "9090:8080"
- "50000:50000"
volumes:
- '~/docker/jenkins:/var/jenkins_home'
- '/var/run/docker.sock:/var/run/docker.sock'
# jupyterhub
version: '3'
services:
java-web-server:
image: jupyterhub/jupyterhub
container_name: 'jhubcontainer'
ports:
- "8000:8000" # Expose the port your Java app runs on
volumes:
- ./jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py
- ./work:/srv/jupyterhub
docker pull jupyterhub/jupyterhub
# 계정 설정
docker exec -it jhubcontainer /bin/bash
useradd [사용자이름]
passwd [사용자이름]
docker build -t my-jupyterhub .
docker-compose up -d # 백그라운드에서 실행
docker-compose down