@@ -2,8 +2,6 @@ FROM node:14 AS development
22
33ENV USERNAME timetracker
44ENV HOME /home/${USERNAME}
5- <<<<<<< HEAD
6- =======
75ENV CHROME_BIN /opt/google/chrome/google-chrome
86# Essential tools and xvfb
97RUN apt-get update && apt-get install -y \
@@ -31,21 +29,16 @@ ARG CHROME_DRIVER_VERSION=2.37
3129RUN mkdir -p /opt/selenium \
3230 && curl http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -o /opt/selenium/chromedriver_linux64.zip \
3331 && cd /opt/selenium; unzip /opt/selenium/chromedriver_linux64.zip; rm -rf chromedriver_linux64.zip; ln -fs /opt/selenium/chromedriver /usr/local/bin/chromedriver;
34- >>>>>>> 4a8aa30f09fdb5fe3693b270317759ccc372de5a
3532
3633RUN useradd -ms /bin/bash ${USERNAME}
3734
3835WORKDIR ${HOME}/time-tracker-ui
3936COPY . .
4037RUN rm -f .env
4138RUN chown ${USERNAME}:${USERNAME} -R ${HOME}/time-tracker-ui
42- <<<<<<< HEAD
43- =======
4439RUN chmod -R 777 ${HOME}/time-tracker-ui
4540
4641
47- >>>>>>> 4a8aa30f09fdb5fe3693b270317759ccc372de5a
48-
4942USER ${USERNAME}
5043RUN npm cache clean --force && npm install
5144EXPOSE 4200
@@ -73,6 +66,12 @@ RUN chown -R ${USERNAME}:${USERNAME} /var/cache/nginx && \
7366 chown -R ${USERNAME}:${USERNAME} /etc/nginx/conf.d
7467RUN touch /var/run/nginx.pid && chown -R ${USERNAME}:${USERNAME} /var/run/nginx.pid
7568
76- # USER ${USERNAME}
69+ # FIXME: Actually if we can deploy to azure in port 80 we need a root user
70+ # Maybe we can refactor this dockerfile to use root user directly this is not a good approach y
71+ # security terms. It's a good practice to have rootless in containers so for this
72+ # we can to refactor this dockerfile and the terraform module to deploy in other ports because
73+ # Ports below 1024 needs root permisions.
74+
75+ # USER ${USERNAME}
7776
7877EXPOSE 80
0 commit comments