-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.release
54 lines (48 loc) · 1.46 KB
/
Dockerfile.release
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM alpine:3.10.2
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT=2019-02-15 \
LANG=en_US.UTF-8 \
HOME=/opt/app \
SHELL=/bin/sh \
# Set this so that CTRL+G works properly \
TERM=xterm \
# Minimum configuration necessary to boot Wocky \
WOCKY_ENV=prod \
WOCKY_INST=testing \
WOCKY_HOST=localhost \
REPLACE_OS_VARS=true
RUN \
# Create default user and home directory, set owner to default \
mkdir -p ${HOME} && \
adduser -s /bin/sh -u 1001 -G root -h ${HOME} -S -D default && \
chown -R 1001:0 ${HOME} && \
# Upgrade Alpine and base packages \
apk --no-cache upgrade && \
# Install necessary shared libs \
apk add --no-cache \
bash \
ca-certificates \
expat \
libgcc \
libstdc++ \
ncurses \
openssl \
tcpdump \
zlib && \
chmod +s /usr/sbin/tcpdump && \
# Update ca certificates \
update-ca-certificates --fresh
USER default
WORKDIR /opt/app
# Expose http, epmd, distributed erlang
EXPOSE 8080 4369 9100
# Deploy the application into the container
ARG RELEASE_NAME=wocky
COPY ./tmp/artifacts/${RELEASE_NAME}.tar.gz ./
RUN tar xfz ${RELEASE_NAME}.tar.gz && \
rm -f ${RELEASE_NAME}.tar.gz
ENTRYPOINT ["bin/wocky"]
# CMD "foreground"