Skip to content

Commit

Permalink
Try and fail to build alpine image to reduce size
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Fernández authored and Sergio Fernández committed Apr 3, 2023
1 parent f49ed91 commit 0756543
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# GenieACS v1.2 Dockerfile # Not working currently
############################

FROM node:18-alpine
LABEL maintainer="acsdesk@protonmail.com"

RUN apk update && apk upgrade && apk add --no-cache git supervisor
RUN mkdir -p /var/log/supervisor

#RUN npm install -g --unsafe-perm genieacs@1.2.9
WORKDIR /opt
RUN git clone https://github.com/genieacs/genieacs.git -b v1.2.9 --depth 1
WORKDIR /opt/genieacs
RUN npm install
RUN npm i -D tslib
RUN npm run build

RUN addgroup -S genieacs
RUN adduser -S -H genieacs -G genieacs
#RUN mkdir /opt/genieacs
RUN mkdir /opt/genieacs/ext

RUN chown genieacs:genieacs /opt/genieacs/ext

RUN mkdir /var/log/genieacs
RUN chown genieacs:genieacs /var/log/genieacs

ADD genieacs.logrotate /etc/logrotate.d/genieacs

WORKDIR /opt
RUN git clone https://github.com/DrumSergio/genieacs-services -b 1.2 --depth 1
RUN mkdir -p /etc/supervisor/conf.d/
RUN cp genieacs-services/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN cp genieacs-services/run_with_env.sh /usr/bin/run_with_env.sh
RUN chmod +x /usr/bin/run_with_env.sh

WORKDIR /var/log/genieacs

CMD ["/usr/bin/supervisord","-c","/etc/supervisor/conf.d/supervisord.conf"]

0 comments on commit 0756543

Please # to comment.