Skip to content

Commit 82f6b3e

Browse files
committed
fix: TT-513 fix dockerfile
1 parent 4148493 commit 82f6b3e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ FROM node:14 AS development
22

33
ENV USERNAME timetracker
44
ENV HOME /home/${USERNAME}
5-
<<<<<<< HEAD
6-
=======
75
ENV CHROME_BIN /opt/google/chrome/google-chrome
86
#Essential tools and xvfb
97
RUN apt-get update && apt-get install -y \
@@ -31,21 +29,16 @@ ARG CHROME_DRIVER_VERSION=2.37
3129
RUN 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

3633
RUN useradd -ms /bin/bash ${USERNAME}
3734

3835
WORKDIR ${HOME}/time-tracker-ui
3936
COPY . .
4037
RUN rm -f .env
4138
RUN chown ${USERNAME}:${USERNAME} -R ${HOME}/time-tracker-ui
42-
<<<<<<< HEAD
43-
=======
4439
RUN chmod -R 777 ${HOME}/time-tracker-ui
4540

4641

47-
>>>>>>> 4a8aa30f09fdb5fe3693b270317759ccc372de5a
48-
4942
USER ${USERNAME}
5043
RUN npm cache clean --force && npm install
5144
EXPOSE 4200
@@ -73,6 +66,12 @@ RUN chown -R ${USERNAME}:${USERNAME} /var/cache/nginx && \
7366
chown -R ${USERNAME}:${USERNAME} /etc/nginx/conf.d
7467
RUN 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

7877
EXPOSE 80

0 commit comments

Comments
 (0)