"atlas-run" inside docker container

Petr Bláha November 20, 2018

i try to run confluence plugin inside docker.

 

my docker file (part of it) look like this:

 

(importing jdk, installing atlassian plugin sdk, ...)

.
.
.

EXPOSE 1990
ENV JAVA_HOME /opt/jdk
ENV PATH ${PATH}:/opt/atlassian-plugin-sdk-${ATLS_VERSION}/bin/:/opt/jdk/bin/
WORKDIR /opt/atlas/
VOLUME ["/opt/atlas/"]
RUN atlas-clean
RUN atlas-run

 

When i run this container / image, it is shutted down right after that (after 1 second).

 

Expected behavior:

- container started and running

- confluence with our plugin accessible on localhost:1990

 

thank you very much

 

3 answers

1 accepted

0 votes
Answer accepted
Petr Bláha November 22, 2018

So finally solved it by combination of advice from @Edwin Kyalangalilwaand running container with -it flag.

 

So:

- changing 

RUN atlas-run

to 

CMD atlas-run

and then -> docker run -it -p 1990:1990 image_name

 

Thank you

0 votes
Petr Bláha November 21, 2018

Yes sorry. This issue occure only in docker. On local machine it works as expected.

0 votes
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2018

Hi @Petr Bláha,

When run locally, do you see your app running on 1990?

You can try running the container as a daemon.

For example:

docker run -d -p 1990:1990 plugin:image
Petr Bláha November 21, 2018

well app is running on desired port, but for just like second. It is immediately exited.

Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 21, 2018

Inside the Docker or locally on your machine?

Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 21, 2018

Change 

RUN atlas-run

to

CMD atlas-run

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events