Docker FFmpeg

Dockerfile FROM ubuntu:22.04 RUN apt-get update && apt-get install -y ca-certificates RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" >> /etc/apt/sources.list RUN apt-get update && apt-get install -y wget java-common RUN wget https://corretto....

May 11, 2023 · 1 min · Steven Jiang

Docker ELK

docker compose files https://github.com/deviantony/docker-elk

September 8, 2022 · 1 min · Steven Jiang

Docker GeoServer

version: '3.1' services: geoserver: image: geonode/geoserver:2.18.2 container_name: geoserver volumes: - /opt/geoserver/data:/geoserver_data/data ports: - 18080:8080 restart: always

September 8, 2022 · 1 min · Steven Jiang

Docker OSM

version: '3.2' services: osm: image: overv/openstreetmap-tile-server:latest container_name: osm volumes: - openstreetmap-data:/var/lib/postgresql/12/main # environment: # - ALLOW_CORS=enabled ports: - 28080:80 restart: always command: "run" networks: - proxy volumes: openstreetmap-data: external: true networks: proxy: external: true

September 8, 2022 · 1 min · Steven Jiang

Docker Oracle11gR2

version: '3.1' services: oracle-xe: image: gvenzl/oracle-xe:11 container_name: oracle-xe restart: always user: 1000:1000 environment: - ORACLE_PASSWORD={password} volumes: - ./data:/u01/app/oracle/oradata ports: - 1521:1521 network_mode: bridge version: '3.1' services: oracle11g: image: registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g container_name: oracle11g privileged: true ports: - 1521:1521 restart: always volumes: - /home/oracle/oradata:/home/oracle/app/oracle/oradata network_mode: bridge root的默认密码为helowin oracle默认密码为oracle

September 8, 2022 · 1 min · Steven Jiang

Docker Keycloak

version: '3' volumes: postgres_data: driver: local services: postgres: image: postgres volumes: - postgres_data:/var/lib/postgresql/data environment: POSTGRES_DB: keycloak POSTGRES_USER: keycloak POSTGRES_PASSWORD: {db password} keycloak: image: quay.io/keycloak/keycloak:legacy environment: DB_VENDOR: POSTGRES DB_ADDR: postgres DB_DATABASE: keycloak DB_USER: keycloak DB_SCHEMA: public DB_PASSWORD: {db password} KEYCLOAK_USER: admin KEYCLOAK_PASSWORD: {password} # Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn't be used in production without knowledge. It is highly recommended that you read the PostgreSQL JDBC driver documentation in order to use it....

September 8, 2022 · 1 min · Steven Jiang

Nginx

安装和配置Nginx容器 文件目录 /home/nginx/conf.d 用于存放配置文件 /home/nginx/cert 用于存放https证书 /home/nginx/html 用于存放网页文件 /home/nginx/logs 用于存放日志 运行nginx容器 docker run -d \ --name nginx --restart always \ -p 80:80 -p 443:443 \ -e "TZ=Asia/Shanghai" \ -v /home/nginx/nginx.conf:/etc/nginx/nginx.conf \ -v /home/nginx/conf.d:/etc/nginx/conf.d \ -v /home/nginx/logs:/var/log/nginx \ -v /home/nginx/cert:/etc/nginx/cert \ -v /home/nginx/html:/usr/share/nginx/html \ nginx:alpine 配置nginx 这里使用Nginx反向代理访问后端服务,由于容器内部通信,因此需要使用容器的IP,也就是172.17.0.1。 在/home/nginx/conf.d创建一个{name}.conf的配置文件,文件内容如下 server { listen 80; server_name 域名/外网IP; index index.html; root /usr/share/nginx/html/{name}/dist; #dist上传的路径 # 避免访问出现 404 错误 location / { try_files $uri $uri/ @router; index index....

March 30, 2021 · 1 min · Steven Jiang

Use Docker to Deploy SpringBoot Jar

构建与启动Java容器。IntelliJ IDEA运行Gradle bootjar命令 将生成的jar包上传到服务器目录,比如/data目录。 在/data目录创建Dockerfile 文件 FROM java:8 ARG JAR_FILE=./*.jar COPY ${JAR_FILE} app.jar ENV TZ=Asia/Shanghai ENTRYPOINT ["java","-jar","/app.jar"] 构建镜像 docker build -t {image}:{tag} . (注意最后有点.) 运行 docker run -d \ --name {name} --restart always \ -p {port}:{port} \ -e "TZ=Asia/Shanghai" \ -e DB_HOST=172.17.0.1 \ -e DB_PWD=mysql_pwd \ -e REDIS_HOST=172.17.0.1 \ -v /data/userData:{镜像内路径} \ {image}:{tag} docker-compose.yml # coming soon

March 30, 2021 · 1 min · Steven Jiang

Cas

install docker run --rm -p 8080:8080 apereo/cas-initializr:6.3.0 curl http://localhost:8080/starter.tgz -o cas.tgz tar -zxvf cas.tgz chmod +x docker-build.sh chmod +x docker-run.sh ./docker-build.sh

March 25, 2021 · 1 min · Steven Jiang

Docker MongoDB

start mongodb 4.4 in docker,use ~/mongo/data to persist data docker-compose.yml version: '3.1' services: mongodb: image: mongo:4.4 command: mongod --auth volumes: - ~/mongo/data:/data/db ports: - 27017:27017 restart: always environment: MONGO_INITDB_ROOT_USERNAME: {username} MONGO_INITDB_ROOT_PASSWORD: {password}

March 24, 2021 · 1 min · Steven Jiang