Docker

What is the equivalent of ‍-h in docker-compose?

允我心安 提交于 2021-02-17 06:23:26
问题 I want convert docker run to docker-compose with -h parameter What is the equivalent of ‍‍‍‍ -h in docker-compose ? My docker run command: docker run --rm -p 8080:80/tcp -p 1935:1935 -p 3478:3478 -p 3478:3478/udp bigbluebutton -h webinar.mydomain.com My docker-compose version: "3" services: bigbluebutton: build: . container_name: "bigbluebutton" restart: unless-stopped ports: - 1935:1935 - 3478:3478 - 3478:3478/udp - 8080:80 networks: public: networks: public: external: name: public 回答1:

超详细的Fastjson<=1.2.47反序列化漏洞复现

匆匆过客 提交于 2021-02-17 06:17:31
本公众号专注于最新漏洞复现,欢迎关注! ---------------------------------------------------------------------------------------- 本文作者:daxi0ng(Timeline Sec新成员) 本文共1946字,阅读大约需要6分钟 0x00 简介 fastjson 是阿里巴巴的开源JSON解析库,它可以解析 JSON 格式的字符串,支持将 Java Bean 序列化为 JSON 字符串,也可以从 JSON 字符串反序列化到 JavaBean。 0x01 漏洞概述 首先,Fastjson提供了autotype功能,允许用户在反序列化数据中通过“@type”指定反序列化的类型,其次,Fastjson自定义的反序列化机制时会调用指定类中的setter方法及部分getter方法,那么当组件开启了autotype功能并且反序列化不可信数据时,攻击者可以构造数据,使目标应用的代码执行流程进入特定类的特定setter或者getter方法中,若指定类的指定方法中有可被恶意利用的逻辑(也就是通常所指的“Gadget”),则会造成一些严重的安全问题。并且在Fastjson 1.2.47及以下版本中,利用其缓存机制可实现对未开启autotype功能的绕过。 0x02 影响版本 Fastjson1.2.47以及之前的版本

are VOLUME in Dockerfile persistent in kubernetes

那年仲夏 提交于 2021-02-17 06:01:18
问题 Some Dockerfile have a VOLUME command. What happens when such containers are deployed in Kubernetes, but no kubernetes volume are provided: no persistent volume (PV), nor persistent volume claim (PVC) ? Where are the file stored ? Is the volume persistent ? For exemple, Dockerfile image for Docker's library/postgreSQL container image has: VOLUME /var/lib/postgresql/data The stable/postgresql helm charts won't always create a PV: kind: StatefulSet ### SNIP SNIP ### containers: - name: {{

MySQL container crash after /etc/mysql/my.cnf change, how to edit back?

旧城冷巷雨未停 提交于 2021-02-17 05:27:29
问题 I changed some mysql config settings and set something wrong, now Docker container keeps restarting and I cannot find the my.cnf file to edit in host filesystem. I have tried aufs/diff folders but so far unable to find it. Also tried: find / -name my.cnf -exec nano {} \; But it does not bring up the file I changed. And I tried to change config.v2.json to start /bin/bash instead of mysqld and restarted docker, but yet it started mysqld (due supervisor or something?) using official mysql

Running application with only some parts in a container [closed]

北城余情 提交于 2021-02-17 05:25:51
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . Improve this question I wanted to know if an application which is being managed by Kubernetes, like Jupiter would work if some elements of it like the CIRCE dispatcher are used without a container. If yes, then broadly what kind of changes are required to be made? Also, are

how to see adb devices on linux container when host is windows 7 machine

情到浓时终转凉″ 提交于 2021-02-17 05:06:15
问题 i have a windows 7 machine with docker tool box installed i downloaded image and running container which have adb installed in it from below link https://hub.docker.com/r/muicoder/adb/ The container is up and running, with container id mentioned below 9ba51613a7be on my host machine(windows 7) , i have nexus 6 connected and i can see the result with adb devices > C:\Users\panmishr>adb devices List of devices attached > * daemon not running; starting now at tcp:5037 > * daemon started

how to see adb devices on linux container when host is windows 7 machine

断了今生、忘了曾经 提交于 2021-02-17 05:05:17
问题 i have a windows 7 machine with docker tool box installed i downloaded image and running container which have adb installed in it from below link https://hub.docker.com/r/muicoder/adb/ The container is up and running, with container id mentioned below 9ba51613a7be on my host machine(windows 7) , i have nexus 6 connected and i can see the result with adb devices > C:\Users\panmishr>adb devices List of devices attached > * daemon not running; starting now at tcp:5037 > * daemon started

How can I setup an official maven docker image with my own global settings.xml?

China☆狼群 提交于 2021-02-17 04:46:11
问题 I use docker for the first time in connection with GitLab CI. I am happy that GitLab does most of the work for me. I am using the official maven docker image maven:3-jdk-8 (https://hub.docker.com/_/maven/) Now I would like to set the global settings.xml on that docker image, which contains data to my nexus server for the deploy phase. I tried to follow this guide: Adding a directory and image in the docker image , but unfortunally I cannot connect to the bash of the docker image. root@build:~

总结:被MySQL UTF8编码坑的惨痛教训...

旧城冷巷雨未停 提交于 2021-02-17 04:30:30
最近遇到几个项目被MySQL的utf8编码坑,想起之前编码问题被坑的惨痛教训,记录一下,警示自己。 曾几何时,每次建库都选utf8,觉得自己比那些用乱七八糟编码的人不知道酷到哪里去了。直到好多年前的某次课程设计做项目的时候,愉快的建了个用户表: CREATE TABLE `test_user` ( `id` int ( 11 ) unsigned NOT NULL AUTO_INCREMENT, `name` varchar ( 32 ) DEFAULT NULL , PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET =utf8; 然后愉快的新增用户:INSERT INTO test_user(name) VALUES("我是😁"),接着愉快的反思人生: Incorrect string value : '\xF0\x9F\x98\x81' for column 'name' at row 1 我是谁?我来自哪里?我在干嘛?难道是我代码里面的字符集用错了?不对啊我所有地方都用的utf8啊…… # MySQL 的UTF8编码是什么? 首先来看官方文档: The character set named utf8 uses a maximum of three bytes per character and contains

Docker 概述

大兔子大兔子 提交于 2021-02-17 02:42:29
什么是Docker? 上图是虚拟机和容器的区别(让不同的应用运行在不同的虚拟机里面,实现了这个应用的隔离,容器技术同样也可以做到应用的隔离,而且它速度要比虚拟化技术要更方便更小巧) Docker能干什么? 简化配置(也是容器最重要的一个功能,源代码、运行环境、配置都可以打包到一个服务器里面,这个容器可以运行在不同的环境里面,配置简化了自然就可以提高开发效率) 代码流水线管理 提高开发效率 隔离应用 整合服务器 调试能力 多租户 快速部署 容器时代的“双城记”,两大热门技术:docker、kubernetes(简称k8s,因为k和s之间有8个字母) kebernetes是一个容器编排的工具(就是对容器的创建、管理、调度、运维等) 大海航行靠舵手--Kubernetes DevOps = 文化 + 过程 + 工具 传统的项目部署: 首先要买一台 Physical server 然后要安装一个操作系统 Operating System Windows或Linux 这就暴露了很多的缺点: 部署非常慢 成本非常高 资源浪费 难于迁移和扩展 可能会被限定硬件厂商 虚拟化技术出现以后: 虚拟化的优点: 资源池———一个物理机的资源分配到了不同的虚拟机里 很容易扩展———加物理机器or加虚拟机 很容易云化———亚马逊AWS,阿里云等 虚拟化的局限性: 每一个虚拟机都是一个完整的操作系统