forked from myrmex-org/docker-lambda-packager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathal2.Dockerfile
More file actions
executable file
·37 lines (27 loc) · 995 Bytes
/
al2.Dockerfile
File metadata and controls
executable file
·37 lines (27 loc) · 995 Bytes
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
FROM amazonlinux:2
MAINTAINER Alexis N-o "alexis@henaut.net"
ENV DEFAULT_USER=myrmex
ENV NODE_VERSION_10 10.16.3
# Install gcc add utilities to manage users and permissions
RUN yum install -y gcc-c++ util-linux shadow-utils zlib-devel openssl-devel libffi-devel tar
# Add a script to install node versions
COPY /install-node.sh /install-node.sh
# Install node v10
# Command "node" defaults to v10
RUN /install-node.sh ${NODE_VERSION_10}
# Add a script to modify the UID / GID for the default user if needed
COPY /usr/local/bin/change-uid /usr/local/bin/change-uid
RUN chmod +x /usr/local/bin/change-uid
# Add a non root user
RUN useradd $DEFAULT_USER -m -d /home/$DEFAULT_USER/ -s /bin/bash
# Create working directory
RUN mkdir /data && chown $DEFAULT_USER:$DEFAULT_USER /data
WORKDIR /data
# Add entrypoint
COPY /al2.entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# Add default command
COPY /cmd.sh /cmd.sh
RUN chmod +x /cmd.sh
CMD ["/cmd.sh"]