-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 999 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (26 loc) · 999 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 elixir:1.9.1-alpine
ARG destination=/opt/app-root
ARG scripts=/usr/local/s2i
ENV scripts_path=${scripts}
ENV src_path=${destination}
ENV MIX_HOME=${destination}
LABEL maintainer="Sepehr Ansaripour <sansaripour@ata-llc.com>" \
io.k8s.description="Platform for building and running a phoenix app" \
io.k8s.display-name="build-phoenix" \
io.openshift.expose-services="4000:http" \
io.openshift.tags="builder,elixir,phoenix"
# Install node/npm
RUN apk add --update npm
# Configure s2i
LABEL io.openshift.s2i.scripts-url=image://${scripts} \
io.openshift.s2i.destination="${destination}"
# Create the app dir
RUN mkdir -p ${destination}/src && adduser -S default -u 1001 -G root -h ${destination} && chown -R default:root ${destination}
# Copy scripts
COPY --chown=default:root ./s2i/bin/ ${scripts}
# Set permissions
RUN chmod a+x -R /usr/local/s2i && chmod a+rwx -R ${destination}
USER 1001
EXPOSE 4000
WORKDIR ${destination}/src
CMD ["${scripts}/usage"]