forked from oVirt/ovirt-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (24 loc) · 856 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
FROM centos
MAINTAINER Garrett LeSage <[email protected]>
# User & group IDs — should match local user
ENV UID 1000
ENV GID 1000
# Install necessary deps
RUN yum install -y git rsync ruby-devel rubygems gcc-c++ curl-devel rubygem-bundler make patch tar openssl zlib-devel
# Set up working directory
RUN mkdir -p /opt/website
WORKDIR /opt/website
# Add generic "docker" user & set permissions
RUN groupadd docker -g $GID
RUN useradd docker -u $UID -g $GID
RUN mkdir -p /home/docker && chown -R docker:docker /home/docker
RUN chown docker:docker /opt/website
# Switch to "docker" user
USER docker
# Set bundle path to map to local working dir
ENV BUNDLE_PATH /opt/website/.gem-docker
# Expose Middleman dev port
EXPOSE 4567:4567
# Running the server is the default command
# (This can be overridden at runtime, of course.)
CMD ["./run-server.sh"]