-
Notifications
You must be signed in to change notification settings - Fork 122
/
Dockerfile
31 lines (24 loc) · 1.05 KB
/
Dockerfile
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
FROM ubuntu:16.04
LABEL maintainer="Arash Pourhabibi Zarandi <[email protected]>"
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r memcache && useradd -r -g memcache memcache
ENV DEBIAN_FRONTEND noninteractive
COPY memcached.tar.gz /memcached.tar.gz
RUN apt-get update && apt-get install -y libevent-2.0-5 vim --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN buildDeps='curl gcc libc6-dev libevent-dev make' \
&& set -x \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/memcached \
&& tar -xzf memcached.tar.gz -C /usr/src/memcached --strip-components=1 \
&& rm memcached.tar.gz \
&& cd /usr/src/memcached/memcached_client \
&& make \
&& chown -R memcache:memcache /usr/src/memcached \
&& apt-get purge -y --auto-remove $buildDeps
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
USER memcache
CMD ["-rps", "18000"]