-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from esl/fixing_docsh_dependency
Fixing docsh dependency As explained in PR: Because when we use amoc (or any other app) as a dependency, we expect it to have a proper list of its own dependencies. Previously we were only including docsh in amoc release, which is now can be used solely for demo purposes. But amoc-arsenal-release didn't have it, and attempts to extract edoc during scenario/info REST calls were crashing.
- Loading branch information
Showing
5 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,40 @@ | ||
FROM phusion/baseimage:focal-1.0.0 as amoc-build | ||
FROM phusion/baseimage:focal-1.0.0 as base-image | ||
FROM base-image as amoc-build | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
git make wget gnupg | ||
RUN apt-get update | ||
RUN apt-get -y install gnupg2 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG otp_vsn=24.0-1 | ||
|
||
RUN wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && \ | ||
dpkg -i erlang-solutions_2.0_all.deb && \ | ||
apt-get update && \ | ||
apt-get install -y esl-erlang=1:${otp_vsn} | ||
ADD https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb /tmp/ | ||
RUN dpkg -i /tmp/erlang-solutions_2.0_all.deb | ||
RUN apt-get update | ||
|
||
RUN apt-get -y install esl-erlang=1:${otp_vsn} | ||
|
||
RUN apt-get -y install git make wget | ||
|
||
COPY . /amoc_build | ||
|
||
RUN cd amoc_build && \ | ||
git clean -ffxd && \ | ||
make rel | ||
|
||
FROM phusion/baseimage:focal-1.0.0 | ||
FROM base-image | ||
MAINTAINER Erlang Solutions <mongoose-im@erlang-solutions.com> | ||
|
||
RUN useradd -ms /bin/bash amoc | ||
|
||
COPY --from=amoc-build /amoc_build/_build/prod/rel/amoc/ /home/amoc/amoc/ | ||
COPY --from=amoc-build /amoc_build/_build/demo/rel/amoc/ /home/amoc/amoc/ | ||
COPY --from=amoc-build /amoc_build/scenarios /amoc_build/scenarios | ||
|
||
# It seems hub.docker.com does not support --chown param to COPY directive | ||
RUN chown -R amoc:amoc /home/amoc/amoc | ||
|
||
EXPOSE 4000 | ||
|
||
RUN mkdir /etc/service/amoc | ||
ADD docker/amoc.sh /etc/service/amoc/run | ||
COPY docker/amoc.sh /etc/service/amoc/run | ||
|
||
CMD ["/sbin/my_init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters