Sample : template of docker file
# Use an official base image FROM ubuntu:20.04 # Set environment variables ENV MY_ENV_VARIABLE=value # Set the working directory inside the container WORKDIR /app # Copy files from the build context to the container COPY . /app # Install dependencies RUN apt-get update && apt-get install -y package1 package2 # Expose a port to listen on EXPOSE 8080 # Specify a default command (can be overridden at runtime) CMD ["executable", "arg1", "arg2"] # Set the entry point for the container (overrides CMD) ENTRYPOINT ["executable"] # Define a volume for data persistence VOLUME /data # Label the image with metadata LABEL maintainer="your.name@example.com" version="1.0" # Add metadata to an image ADD file.tar.gz /data # Specify a user to run the container USER appuser # Healthcheck to monitor container health HEALTHCHECK --interval=30s --timeout=5s CMD curl -f http://localhost/ || exit 1 # Set stop signal STOPSIGNAL SIGTERM # Spec...