dehub/cmd/http-server/Dockerfile
mediocregopher 181802ba0e add initial implementation of the http-server
message: add initial implementation of the http-server
change_hash: APsMce7qqUtJPVAOn1p8FlI9/OazPFbSoL1Ycoxw5tU1
credentials:
- type: pgp_signature
  pub_key_id: 95C46FA6A41148AC
  body: iQIzBAABAgAdFiEEJ6tQKp6olvZKJ0lwlcRvpqQRSKwFAl5It7AACgkQlcRvpqQRSKwVcA//ZjIpYtcGiZjVU39YzgzsN4JNO9wttzOMy3hC01wxe4XzLh0SCX9oCIHqaRMQbcdcvC3BEuu70IyJHKow+lBMhNTeGBOjVS4tHqKqskLP4LsU05U+jhXF4wZFxtApgOvEX43G/156g2RC28VFXCm5XDeNHiMggz3fbRzoY5YCPz7WudQTDFVW/t+ULLEKGyZMZ56vfScxziQqs1R1eQBCPvwGTD/h6pSOMGrdLSk8vrGtYdewqWum88H6eXsfgu1Lo1JGfe0Gf1R5CedzUATOfZ1J7T0WfYQRiBS0qpOmA/Ys1ef/YyKWyUnfvTrr+NR2cB3AqdS61mLwXcDqrGrasKos+aOF5N4v/3DvoEnlRFlln+LpQJFDIj8uDRw6ODvJh1sg7yVPnBiJcKWt8jkpHM2KS6gWAZ7iHBbyj+AsXpw4qs81WVZV4/Hq/uDp+OxHz/H+DALanULzXJCX8+WEC0Kf/rTtb5G9nuYlI6kJ09DQzD7Po20cHavmY8ZCc97F8bqNT2Pm5zkP/DemthazhU0gCh5Tyvph7v5xaWHK12gsBpANUI33h/tXfzirv4z7OWTiYIQ8fYEekt8/zBtujq7dTsbOpVDrD0M5NDKMi1rnYm/bH914Q2XdIh5ZXsgmYmM4aVI54fwfonUjCyf6rihAlkFZNdWXFsiTmzGLqyw=
  account: mediocregopher
2020-02-15 20:32:00 -07:00

36 lines
1.1 KiB
Docker

FROM debian:jessie
# Setup Container
VOLUME ["/repos"]
EXPOSE 80
# Setup APT
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Update, Install Prerequisites, Clean Up APT
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update && \
apt-get -y install git wget nginx-full fcgiwrap && \
apt-get clean
# Setup Container User
RUN useradd -M -s /bin/false git --uid 1000
# Setup nginx fcgi services to run as user git, group git
RUN sed -i 's/FCGI_USER="www-data"/FCGI_USER="git"/g' /etc/init.d/fcgiwrap && \
sed -i 's/FCGI_GROUP="www-data"/FCGI_GROUP="git"/g' /etc/init.d/fcgiwrap && \
sed -i 's/FCGI_SOCKET_OWNER="www-data"/FCGI_SOCKET_OWNER="git"/g' /etc/init.d/fcgiwrap && \
sed -i 's/FCGI_SOCKET_GROUP="www-data"/FCGI_SOCKET_GROUP="git"/g' /etc/init.d/fcgiwrap
# Create config files for container startup and nginx
COPY nginx.conf /etc/nginx/nginx.conf
# Create pre-receive
COPY dehub /usr/bin/dehub
COPY "pre-receive" /pre-receive
# Create start.sh
COPY start.sh /start.sh
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]