Ans:How to upload the docker file
pranaylobo opened this issue · comments
Use google cloud run API its free for testing .You can get the documentation .I am posting my dockerfile which shawon had given i changed accordingly
#Use the Ubuntu base image
FROM ubuntu
#Update all packages
RUN apt-get update
#Install tzdata and set timezone.
ENV TZ=America/Chicago
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get -y install tzdata
#Install Software Properties
RUN apt-get update &&
apt-get install -y software-properties-common &&
rm -rf /var/lib/apt/lists/*
#Install C/C++ Compiler
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update &&
apt-get -y install gcc mono-mcs &&
rm -rf /var/lib/apt/lists/*
#Install Java Compiler
RUN apt-get update &&
DEBIAN_FRONTEND=noninteractive
apt-get -y install default-jre-headless &&
apt-get clean &&
rm -rf /var/lib/apt/lists/*
#Install applications
FROM php:7.3-apache
Copy local code to the container image.
COPY Online /var/www/html/
Use the PORT environment variable in Apache configuration files.
RUN sed -i 's/80/${PORT}/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
Configure PHP for development.
Switch to the production php.ini for production operations.
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
https://hub.docker.com/_/php#configuration
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
this will help you