-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-alpine
39 lines (32 loc) · 1.03 KB
/
Dockerfile-alpine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# vim:set ft=dockerfile:
#
# Docker AdonisJs
# ---------------
# Container based on
# LucasRGoes/docker-adonisjs: https://github.com/LucasRGoes/docker-adonisjs
#
# AdonisJs is a Node.js MVC framework that runs on all major operating
# systems. It offers a stable ecosystem to write server-side web applications
# so you can focus on business needs over finalizing which package to choose or
# not.
#
FROM node:21.7.1-alpine3.18
MAINTAINER lucas.rd.goes@gmail.com
WORKDIR /app
# change ownership of the "/app" dir to be used by the node user
# install "dumb-init" to handle a container's child process problem
RUN set -eux; \
chown node:node /app; \
apk add --update-cache \
dumb-init; \
rm -rf /var/cache/apk/*
# rewrites npm global root directory
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=$PATH:/home/node/.npm-global/bin
# install "adonis-cli" to handle apps built using the AdonisJs framework
RUN set -eux; \
npm i -g \
@adonisjs/cli@4.0.13
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["node", "server.js"]
USER node