Skip to content

Commit

Permalink
change base image to Ubuntu jammy
Browse files Browse the repository at this point in the history
  • Loading branch information
mroberts-panw committed Dec 6, 2022
1 parent 960a020 commit 0daaf16
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions sca-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
FROM node:10-alpine
RUN mkdir /app
RUN groupadd -r johnnycodev && useradd -r -s /bin/false -g johnnycodev johnnycodev
WORKDIR /app
COPY . /app
RUN chown -R johnnycodev:johnnycodev /app
USER johnnycodev
CMD node index.js
EXPOSE 80
FROM ubuntu:jammy-20221020

# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive

# Update Ubuntu Software repository
RUN apt update

# Install nginx, php-fpm and supervisord from ubuntu repository
RUN apt install -y nginx php-fpm supervisor && \
rm -rf /var/lib/apt/lists/* && \
apt clean

# Define the ENV variable
ENV nginx_vhost /etc/nginx/sites-available/default
ENV php_conf /etc/php/7.4/fpm/php.ini
ENV nginx_conf /etc/nginx/nginx.conf
ENV supervisor_conf /etc/supervisor/supervisord.conf

RUN mkdir -p /run/php && \
chown -R www-data:www-data /var/www/html && \
chown -R www-data:www-data /run/php

# Volume configuration
VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"]

# Expose Port for the Application
EXPOSE 80 443

0 comments on commit 0daaf16

Please sign in to comment.