Dockerfile

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License. # ActiveMQ Artemis FROM jboss/base-jdk:8
LABEL maintainer="Apache ActiveMQ Team"
# Make sure pipes are considered to determine success, see: https://github.com/hadolint/hadolint/wiki/DL4006
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /opt ENV ARTEMIS_USER artemis
ENV ARTEMIS_PASSWORD artemis
#是否允许匿名登录
ENV ANONYMOUS_LOGIN false
ENV EXTRA_ARGS --http-host 0.0.0.0 --relax-jolokia USER root ADD . /opt/activemq-artemis
#解压
RUN tar -zxf /opt/activemq-artemis/apache-artemis-2.17.0-bin.tar.gz --strip-components 1 -C /opt/activemq-artemis/ # Web Server
EXPOSE 8161 \
# JMX Exporter
9404 \
# Port for CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE
61616 \
# Port for HORNETQ,STOMP
5445 \
# Port for AMQP
5672 \
# Port for MQTT
1883 \
#Port for STOMP
61613 RUN mkdir /var/lib/artemis-instance && chmod 777 -R /var/lib/artemis-instance COPY docker-run.sh / # Expose some outstanding folders
VOLUME ["/var/lib/artemis-instance"]
WORKDIR /var/lib/artemis-instance ENTRYPOINT ["/docker-run.sh"]
RUN ["chmod", "+x", "/docker-run.sh"]
CMD ["run"]

docker-compose.yml

version: '3'
services:
artemis:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
network_mode: "host"
container_name: artemis
privileged: true
volumes:
- /etc/localtime:/etc/localtime
- /home/docker/artemis-instance:/var/lib/artemis-instance
ports:
- 1883:1883
- 8161:8161
- 8883:8883

docker-run.sh

#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License. # This is the entry point for the docker images.
# This file is executed when docker run is called. set -e BROKER_HOME=/var/lib/
CONFIG_PATH=$BROKER_HOME/etc
export BROKER_HOME OVERRIDE_PATH CONFIG_PATH if [[ ${ANONYMOUS_LOGIN,,} == "true" ]]; then
LOGIN_OPTION="--allow-anonymous"
else
LOGIN_OPTION="--require-login"
fi CREATE_ARGUMENTS="--user ${ARTEMIS_USER} --password ${ARTEMIS_PASSWORD} --silent ${LOGIN_OPTION} ${EXTRA_ARGS}" echo CREATE_ARGUMENTS=${CREATE_ARGUMENTS} if ! [ -f ./etc/broker.xml ]; then
/opt/activemq-artemis/bin/artemis create ${CREATE_ARGUMENTS} .
else
echo "broker already created, ignoring creation"
fi exec ./bin/artemis "$@"

apache-artemis-2.17.0-bin.tar.gz 下载

https://yvioo.lanzouw.com/ix72lvv5ecd

把所有东西放在一个文件夹内

执行docker-compose up 即可

然后日志打印

这个的web登录页面的用户名密码

访问http://localhost:8161/

用户名密码都是artemis

docker安装artemis的更多相关文章

  1. 理解Docker(1):Docker 安装和基础用法

    本系列文章将介绍Docker的有关知识: (1)Docker 安装及基本用法 (2)Docker 镜像 (3)Docker 容器的隔离性 - 使用 Linux namespace 隔离容器的运行环境 ...

  2. docker安装

    系统要求:需要一个64位的centos7操作系统和版本3.10或更高版本的Linux内核 开始安装: uname -r   //查看内核版本yum -y update //更新系统更新到最新 #安装d ...

  3. 2. Docker - 安装

    一.Docker介绍 1. Docker是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上, 也可以实现虚拟化. 容器时完全使用沙 ...

  4. Docker 安装部署

    Docker学习笔记 一.Ubuntu Docker 安装 (1).获取最新版本Docker安装包 lyn@lyn:/data/docker$ sudo wget -qO- https://get.d ...

  5. docker 安装

    Docker使用了一种叫AUFS的文件系统,这种文件系统可以让你一层一层地叠加修改你的文件,最底下的文件系统是只读的,如果需要修改文件,AUFS会增加一个可写的层(Layer),这样有很多好处,例如不 ...

  6. Docker安装及基本使用方法

    Docker安装 CentOS6上安装Docker # yum -y install epel-release # yum -y install docker-io CentOS7上安装Docker ...

  7. Mac 下 docker安装

    http://www.th7.cn/system/mac/201405/56653.shtml Mac 下 docker安装 以及 处理错误Cannot connect to the Docker d ...

  8. docker安装caffe

    [最近一直想要学习caffe,但是苦苦纠结于环境安装不上,真的是第一步都迈不出去,还好有docker的存在!下面,对本人如何利用docker安装caffe做以简单叙述,不属于教程,只是记录自己都做了什 ...

  9. Docker安装Gitlab

    一.Ubuntu16.4上Docker安装Gitlab 1.安装docker 参见:https://docs.docker.com/engine/installation/linux/ubuntuli ...

随机推荐

  1. [Noip 2018][标题统计 龙湖斗 摆渡车 对称二叉树]普及组题解

    啊喂,都已经9102年了,你还在想去年? 这里是一个Noip2018年PJ第二题打爆的OIer,错失省一 但经过了一年,我学到了很多,也有了很多朋友,水平也提高了很多,现在回看当时: 今年的Noip ...

  2. 【shell】真正解决syntax error:unexpected end of file?

    今天写了个较长的shell脚本,结构嵌套比较多,最后运行时,出现了syntax error: unexpected end of file的错误. 这个之前碰到过,经常在win系统转移脚本文件到uni ...

  3. 自动添加shell脚本头部信息

    autocmd BufNewFile *.sh exec ":call AddTitleForShell()" function AddTitleForShell() call a ...

  4. APP工程师接入Telink Mesh流程 -3

    加密是为了使网络更加的安全.健壮,若由于login.加密等流程 严重影响了 开发进程,也可以通过 修改SDK 固件 将login.加密 环节取消 1.发送数据.接受数据加密,解密去掉 mesh_sec ...

  5. 从零开始学习oracle

    引用博客:https://blog.csdn.net/qq_36998053/article/details/82725765 )Oracle之<环境配置> (二)Oracle之<基 ...

  6. 年底巩固下 CS 知识「GitHub 热点速览 v.21.49」

    作者:HelloGitHub-小鱼干 期末到了!是时候来一波 CS 复习资料了,从本科基础知识开始到实用编程技术.本周 GitHub 热点趋势榜给你提供了最全的复习资料:清华的 CS 四年学习资料.W ...

  7. Shell学习(九)——chattr与lsattr命令详解

    有时候你发现用root权限都不能修改某个文件,大部分原因是曾经用chattr命令锁定该文件了.chattr命令的作用很大,其中一些功能是由Linux内核版本来支持的,不过现在生产绝大部分跑的linux ...

  8. typora使用快捷键

    1. Ctrl+/ 切换源码模式2. ```css 选择语言 回车.4. `code` ctrl+shit+` 5. # 1号标题 ctrl+1 ### 3号标题 ctrl+3 ######6号标题 ...

  9. 【Linux】【Services】【Web】Nginx基础

    1. 概念 1.1. 消息通知机制:同步synchronous,异步asynchronous 同步:等待对方返回信息 异步:被调用者通过状态.通知或回调通知调用者 状态:调用者每隔一段时间就需要检查一 ...

  10. 【Java基础】方法调用机制——MethodHandle

    MethodHandle是Java7引入的一种机制,主要是为了JVM支持动态语言. 一个MethodHandle调用示例 共有方法调用 首先,演示一下最基本的MethodHandle使用. 第一步:创 ...