Skip to content

Commit 268904d

Browse files
Merge pull request #2802 from devtron-labs/fix-dockerfile-optimise
fix: dockerfile 2nd stages fixes
2 parents 498827a + 7563a33 commit 268904d

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

Dockerfile

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,27 @@ RUN yarn build
2222

2323
FROM fholzer/nginx-brotli:v1.26.2
2424

25-
RUN useradd -ms /bin/bash devtron
25+
# Install bash
26+
RUN apk add --no-cache bash shadow
27+
28+
RUN useradd -m -s /bin/bash devtron
29+
2630
COPY --from=builder /app/dist/ /usr/share/nginx/html
2731
COPY ./nginx.conf /etc/nginx/nginx.conf
2832
COPY ./nginx-default.conf /etc/nginx/conf.d/default.conf
33+
2934
WORKDIR /usr/share/nginx/html
30-
COPY --from=builder /app/./env.sh .
31-
COPY --from=builder /app/.env .
32-
COPY --from=builder /app/health.html .
3335

34-
# Make our shell script executable
36+
COPY --from=builder /app/env.sh .
37+
COPY --from=builder /app/.env .
38+
COPY --from=builder /app/health.html .
39+
3540
RUN chown -R devtron:devtron /usr/share/nginx/html && \
36-
chmod +x env.sh
41+
chmod +x env.sh
42+
3743
USER devtron
38-
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""]
44+
45+
# Override the default ENTRYPOINT to allow shell scripting as fholzer/nginx-brotli has by-default entrypoint of nginx
46+
ENTRYPOINT ["/bin/bash", "-c"]
47+
48+
CMD ["./env.sh && nginx -g 'daemon off;'"]

src/components/common/navigation/NavigationRoutes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
171171
const controls = animate(navBarWidth, NAVBAR_WIDTH, {
172172
duration: 0.3,
173173
ease: 'easeOut',
174-
delay: 1,
174+
delay: 0.6,
175175
})
176176
return controls.stop
177177
}

0 commit comments

Comments
 (0)