Add a Dockerfile

Message ID 20171006094326.15488-1-jonatan.schlag@ipfire.org
State New
Headers show
Series
  • Add a Dockerfile
Related show

Commit Message

Jonatan Schlag Oct. 6, 2017, 8:43 p.m. UTC
To create a container for our pbs service we add a Docker image based on ipfire/pakfire:latest.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
 Dockerfile | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Dockerfile

Patch

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..4665311
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,27 @@ 
+FROM ipfire/pakfire:latest
+MAINTAINER jonatanschlag
+
+RUN yum update -y && \
+	yum install -y epel-release && \
+	yum install -y python python-tornado python-daemon python-psycopg2 pytz-2016.10 python-memcached python-textile && \
+	groupadd -g 2000 pbs && \
+	useradd --system --no-create-home --shell /bin/bash --uid 2000 --gid 2000 pbs && \
+	yum autoremove -y && \
+	yum clean all && \
+	rm -rf /var/tmp/* /var/cache/yum/* /opt/dev/* && \
+	mkdir -p /opt/pbs
+
+COPY . /opt/pbs
+
+RUN chown -R pbs:pbs /opt/pbs && \
+	chmod +x /opt/pbs/pakfire-web && \
+	chmod +x /opt/pbs/pakfire-hub && \
+	chmod +x /opt/pbs/pakfire-manager 
+
+WORKDIR /opt/pbs
+
+USER pbs
+
+# Define default command.
+CMD ["/bin/bash"]
+