Skip to content

Instantly share code, notes, and snippets.

@mohammad-quanit
Created March 21, 2023 18:57
Show Gist options
  • Save mohammad-quanit/3b236ae8b79157c9e68491fc9921c747 to your computer and use it in GitHub Desktop.
Save mohammad-quanit/3b236ae8b79157c9e68491fc9921c747 to your computer and use it in GitHub Desktop.
Ubuntu Docker Image with Nginx Installed
ARG CODE_VERSION=20.04
FROM ubuntu:${CODE_VERSION}
LABEL Creator="mquanit"
ENV TZ=Asia/Dubai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt install -y tzdata && apt-get install -y nginx && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN mkdir /home/codes
#set env variables
ENV USER mquanit
ENV SHELL /bin/bash
ENV LOGNAME mquanit
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment