Skip to content

Commit 0daaf16

Browse files
committed
change base image to Ubuntu jammy
1 parent 960a020 commit 0daaf16

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

sca-image/Dockerfile

+28-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1-
FROM node:10-alpine
2-
RUN mkdir /app
3-
RUN groupadd -r johnnycodev && useradd -r -s /bin/false -g johnnycodev johnnycodev
4-
WORKDIR /app
5-
COPY . /app
6-
RUN chown -R johnnycodev:johnnycodev /app
7-
USER johnnycodev
8-
CMD node index.js
9-
EXPOSE 80
1+
FROM ubuntu:jammy-20221020
2+
3+
# Disable Prompt During Packages Installation
4+
ARG DEBIAN_FRONTEND=noninteractive
5+
6+
# Update Ubuntu Software repository
7+
RUN apt update
8+
9+
# Install nginx, php-fpm and supervisord from ubuntu repository
10+
RUN apt install -y nginx php-fpm supervisor && \
11+
rm -rf /var/lib/apt/lists/* && \
12+
apt clean
13+
14+
# Define the ENV variable
15+
ENV nginx_vhost /etc/nginx/sites-available/default
16+
ENV php_conf /etc/php/7.4/fpm/php.ini
17+
ENV nginx_conf /etc/nginx/nginx.conf
18+
ENV supervisor_conf /etc/supervisor/supervisord.conf
19+
20+
RUN mkdir -p /run/php && \
21+
chown -R www-data:www-data /var/www/html && \
22+
chown -R www-data:www-data /run/php
23+
24+
# Volume configuration
25+
VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"]
26+
27+
# Expose Port for the Application
28+
EXPOSE 80 443

0 commit comments

Comments
 (0)