You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/02/01 07:28:00 UTC
[jira] [Work logged] (ARTEMIS-3042) Official Docker Multistage Build as well as an official Docker image.
[ https://issues.apache.org/jira/browse/ARTEMIS-3042?focusedWorklogId=842777&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-842777 ]
ASF GitHub Bot logged work on ARTEMIS-3042:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 01/Feb/23 07:27
Start Date: 01/Feb/23 07:27
Worklog Time Spent: 10m
Work Description: SamTV12345 commented on PR #4307:
URL: https://github.com/apache/activemq-artemis/pull/4307#issuecomment-1411582053
Weird. Last time I waited 20 minutes and nothing changed. I am stuck at this screen
<img width="460" alt="image" src="https://user-images.githubusercontent.com/40429738/215977162-e8870da2-d03f-48a5-9696-12227864ea98.png">
If you have time could you start this Dockerfile
````yaml
ARG CURRENT_VERSION=2.17.0
FROM maven:3.8.7-eclipse-temurin-11 as builder
ARG CURRENT_VERSION
COPY settings.xml /.m2/settings.xml
ENV MAVEN_SETTINGS_PATH=/.m2/settings.xml
COPY . .
RUN mvn -ntp clean install -Prelease -DskipTests -Dmaven.repo.local=/.m2/repository -s /.m2/settings.xml
FROM alpine:latest
ARG CURRENT_VERSION
ENV VERSION=$CURRENT_VERSION
RUN apk --no-cache add openjdk17-jre-headless bash libaio\
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
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
# add user and group for artemis
RUN addgroup -g 1001 artemis && adduser -u 1002 --ingroup artemis --disabled-password artemis
USER artemis
COPY --from=builder /root/artemis-build/_TMP_/artemis/${VERSION}/ /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
USER root
RUN mkdir /var/lib/artemis-instance && chown -R artemis.artemis /var/lib/artemis-instance
COPY --from=builder /root/artemis-build/_TMP_/artemis/${VERSION}/docker/docker-run.sh /
USER artemis
# Expose some outstanding folders
VOLUME ["/var/lib/artemis-instance"]
WORKDIR /var/lib/artemis-instance
ENTRYPOINT ["/docker-run.sh"]
CMD ["run"]
```
If you don't have a settings.xml defined you need to remove the instructions COPY settings.xml /.m2/settings.xml, ENV MAVEN_SETTINGS_PATH=/.m2/settings.xml and the part in the mvn clean install script starting with -Dnaveb.repo.local...
After copying the Dockerfile in artemis-docker, execute from the root of the project execute `docker build -t test -f ./artemis-docker/Dockerfile-build-alpine .`
It is currently not working I just want to make sure that the build in the Dockerfile is working
The specs of my proxmox test machine are:
i5 4570T and 16 Gigabyte RAM.
The alpine Linux LXC for building has all cores and 8 Gigabyte assigned.
Issue Time Tracking
-------------------
Worklog Id: (was: 842777)
Time Spent: 6h (was: 5h 50m)
> Official Docker Multistage Build as well as an official Docker image.
> ---------------------------------------------------------------------
>
> Key: ARTEMIS-3042
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3042
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: John Behm
> Priority: Minor
> Labels: docker,, dockerfile,, kubernetes
> Time Spent: 6h
> Remaining Estimate: 0h
>
> It would be rather convenient to get people up and running with an easy to build or to setup Docker image that automatically builds the project from source, discards the build container and moves the necessary files over to the final container that can simply be started.
> The current docker image build is not really user firendly or convenient at all.
>
> https://github.com/apache/activemq-artemis/tree/master/artemis-docker
> The whole setup process of artemis in a containerized environment is very far from even good.
> The hurdle of using this software is gigantic, as the configuration is so complex, one will not be able to do this within one month without having gone through the whole documentation multiple times.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)