Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support linux/arm64/v8 builds #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,42 @@
#
# This file is part of alpine-sqs which is released under the GPLv3.
# See https://github.com/roribio/alpine-sqs for details.
ARG ARCH

FROM appropriate/curl as Builder

ARG jq_version=1.5
FROM alpine:3.13 as builder

WORKDIR /tmp/sqs-alpine

RUN \
apk add --update git \
&& rm -rf /var/cache/apk/* \
apk add --no-cache \
curl \
git \
jq \
&& git clone --verbose --depth=1 https://github.com/kobim/sqs-insight.git \
&& curl -L -o /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-${jq_version}/jq-linux64 \
&& chmod +x /usr/local/bin/jq \
&& export elasticmq_version=$(curl -sL https://api.github.com/repos/adamw/elasticmq/releases/latest | jq -r .tag_name) \
&& elasticmq_version=${elasticmq_version//v} \
&& curl -LO https://s3-eu-west-1.amazonaws.com/softwaremill-public/elasticmq-server-${elasticmq_version}.jar \
&& curl -sLO https://s3-eu-west-1.amazonaws.com/softwaremill-public/elasticmq-server-${elasticmq_version}.jar \
&& mv elasticmq-server-${elasticmq_version}.jar elasticmq-server.jar

FROM anapsix/alpine-java:8
FROM ${ARCH}/openjdk:8-alpine

LABEL maintainer="Ronald E. Oribio R. https://github.com/roribio"

COPY --from=Builder /tmp/sqs-alpine/ /opt/
COPY --from=builder /tmp/sqs-alpine/ /opt/
COPY etc/ /etc/
COPY opt/ /opt/

RUN \
apk add --update \
apk add --no-cache \
nodejs \
nodejs-npm \
supervisor \
libtasn1=4.14-r0 \
&& apk upgrade musl \
&& rm -rf \
/var/cache/apk/* \
/etc/supervisord.conf \
&& rm -rf /etc/supervisord.conf \
&& ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf \
&& cd /opt/sqs-insight \
&& npm install

EXPOSE 9324 9325
EXPOSE 9324 9325 9326

ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]

3 changes: 1 addition & 2 deletions etc/supervisor/conf.d/elasticmq.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[program:elasticmq]
command=/opt/jdk/bin/java -Dconfig.file=/opt/config/elasticmq.conf -jar /opt/elasticmq-server.jar
command=/usr/bin/java -Dconfig.file=/opt/config/elasticmq.conf -jar /opt/elasticmq-server.jar
priority=10
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true

1 change: 0 additions & 1 deletion etc/supervisor/conf.d/insight.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true

1 change: 0 additions & 1 deletion etc/supervisor/conf.d/sqs-init.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ startsec=0
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

1 change: 0 additions & 1 deletion etc/supervisor/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket

[include]
files = /etc/supervisor/conf.d/*.conf

1 change: 0 additions & 1 deletion opt/elasticmq.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ queues {
receiveMessageWait = 0 seconds
}
}

1 change: 0 additions & 1 deletion opt/sqs-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ cp /opt/config/sqs-insight.conf /opt/sqs-insight/config/config_local.json

sleep 1
exit 0

3 changes: 1 addition & 2 deletions opt/sqs-insight.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"port": 9325,
"port": 9326,
"rememberMessages": 100,

"endpoints": [],
Expand All @@ -14,4 +14,3 @@
}
]
}