cmd/storagenode: bug fixes to storagenode docker image

This change fixes the following issues:

wget: Alpine docker image by default uses the builtin BusyBox wget which is not capable of handling SSL traffic via proxy unlike the GNU wget. We have to replace BusyBox wget with GNU wget.

updater failing to restart the node: supervisorctl pointing to wrong config file. We remove the default configuration file and point supervisorctl to custom config in systemctl

updates https://github.com/storj/storj/issues/4489

Change-Id: I24a7f18377ba723bbc377bb5d25aaa14f37021b1
This commit is contained in:
Clement Sam 2022-03-18 08:41:21 +00:00
parent 466832e4bc
commit 51e5e949a4
2 changed files with 6 additions and 2 deletions

View File

@ -1,8 +1,12 @@
ARG DOCKER_ARCH
FROM ${DOCKER_ARCH:-amd64}/alpine:3.15
RUN apk --no-cache -U add ca-certificates supervisor
RUN apk --no-cache -U add ca-certificates supervisor wget
RUN mkdir -p /var/log/supervisor /app
COPY cmd/storagenode/docker-base/ /
# set permissions to allow non-root access
RUN chmod -R a+rw /etc/supervisor /var/log/supervisor /app
# remove the default supervisord.conf
RUN rm -rf /etc/supervisord.conf
# create a symlink to custom supervisord config file at the default location
RUN ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf

View File

@ -5,4 +5,4 @@ if [ "$*" != "show --property=MainPID storagenode" ]; then
exit 1
fi
printf 'MainPID=%s' "$(supervisorctl pid storagenode)"
printf 'MainPID=%s' "$(supervisorctl -c /etc/supervisor/supervisord.conf pid storagenode)"