-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (31 loc) · 977 Bytes
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
############################################################
# Dockerfile to run Memcached Containers
# Based on CentOS 6 Image
############################################################
# Set the base image to use to CentOS
FROM centos:centos6
# Set the file maintainer (your name - the file's author)
MAINTAINER Paulo McNally <[email protected]>
# Install dependencies
RUN yum -y install tar wget gcc make libevent libevent-devel
# Go to installation directory
WORKDIR /usr/local/src
# Download memcached source
RUN wget http://www.memcached.org/files/memcached-1.4.20.tar.gz
# Uncompress source
RUN tar xvzf memcached-1.4.20.tar.gz
# Goto source folder
WORKDIR memcached-1.4.20
# Configure
RUN ./configure --enable-64bit
# Make
RUN make
# Make install
RUN make install
# Port to expose (default: 11211)
EXPOSE 11211
# Default Memcached run command arguments
# 1024 = 1GB
CMD ["memcached", "-m", "1024"]
# Set the user to run Memcached daemon
USER nobody