Skip to content

Instantly share code, notes, and snippets.

@hsteinshiromoto
Created August 28, 2019 12:36
Show Gist options
  • Save hsteinshiromoto/ec197d5a9e5c0f79d427e9630b462e8b to your computer and use it in GitHub Desktop.
Save hsteinshiromoto/ec197d5a9e5c0f79d427e9630b462e8b to your computer and use it in GitHub Desktop.
Wordpress: Dockerfile
FROM python:3.7-slim-stretch
# ---
# Build Arguments
# ---
ARG BUILD_DATE
ARG PROJECT_NAME
# Avoid questions from debconf
ARG DEBIAN_FRONTEND=noninteractive
# ---
# Environment Variables
# ---
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
ENV HOME /home/$PROJECT_NAME
# ---
# Label
# ----
LABEL org.label-schema.build-date=$BUILD_DATE \
maintainer="Dr Humberto STEIN SHIROMOTO <h.stein.shiromoto@gmail.com>"
# ---
# Update OS and Install Packages
# ---
RUN apt-get update && apt-get install -y gosu
# ---
# Create Home Folder
# ---
RUN mkdir -p $HOME
# ---
# Copy Necessary Files
# ---
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# ---
# Run Commands
# ---
RUN chmod +x /usr/local/bin/entrypoint.sh
# ---
# Setup Workdir
# ---
WORKDIR $HOME
# ---
# Setup Entrypoint
# ----
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment