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. C++ and OO Num. Comp. Sci. Eng. - Part 4.

    命名空间与文件(Namespaces and Files) 在 C++ 中,命名空间为包含相关声明与定义的逻辑单元. 将一个大程序分割为不同部分并且将其储存在不同的文件中可以实现模块化编程. 未命名的 ...

  2. 2基因组间鉴定SV

    本文学习费章军老师文章Genome of Solanum pimpinellifolium provides insights into structural variants during toma ...

  3. Xpath解析库的使用

    ### Xpath常用规则 ## nodename 选取此节点的所有子节点 ## / 从当前节点选取直接子节点 ## // 从当前节点选取子孙节点 ## . 选取当前节点 ## .. 选取当前节点的父 ...

  4. LeetCode二维数组中的查找

    LeetCode 二维数组中的查找 题目描述 在一个 n*m 的二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增.请完成一个搞笑的函数,输入这样的一个二维数组和一个整数,判断数 ...

  5. accommodate, accompany

    accommodate 词源: to make fit, suitable; 近/反义词: adapt, adjust, lodge; disoblige, incommode, misfit Lod ...

  6. day12 keepalived高可用

    day12 keepalived高可用 一.高可用介绍 1.什么是高可用 部署在整个集群中的一个高可用软件,作用是创建一个VIP(虚拟IP),在整个集群中有且只有一个机器上生成VIP,当这台机器出现问 ...

  7. k8s使用ceph的rbd作后端存储

    k8s使用rbd作后端存储 k8s里的存储方式主要有三种.分别是volume.persistent volumes和dynamic volume provisioning. volume: 就是直接挂 ...

  8. 使用WtmPlus低代码平台提高生产力

    低代码平台的概念很火爆,产品也是鱼龙混杂. 对于开发人员来说,在使用绝大部分低代码平台的时候都会遇到一个致命的问题:我在上面做的项目无法得到源码,完全黑盒.一旦我的需求平台满足不了,那就是无解.   ...

  9. Linux系统根目录下各文件夹介绍

    参考自:[1]Linux 系统根目录下各个文件夹的作用 https://www.cnblogs.com/jiangfeilong/p/10538795.html[2]了解Linux根目录"/ ...

  10. spring Profile 为不同环境提供不同的配置支持

    说明 Profile为在不同环境下使用不同的配置提供了支持(开发环境下的配置和生产环境下的配置肯定是不同的, 例如, 数据库的配置) . 在spring开发中用@Profile 注解使用来选择行配置系 ...