Skip to content

Commit 91b6068

Browse files
authored
Merge pull request #3635 from tarlepp/chore(ci)/build-configuration
Chore(CI): Updated build command
2 parents 6ec52b3 + 28309d8 commit 91b6068

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
run: echo "DOCKER_TAG=$(echo ${GITHUB_REF} | sed -r 's/[\/()\.]+/_/g')-${GITHUB_SHA}" >> $GITHUB_OUTPUT
134134

135135
- name: Build the Docker image
136-
run: docker build . --file Dockerfile --target production --tag angular-ngrx-frontend:${{ steps.vars.outputs.DOCKER_TAG }}
136+
run: docker build . --file Dockerfile --build-arg TARGET=production --tag angular-ngrx-frontend:${{ steps.vars.outputs.DOCKER_TAG }}
137137

138138
- name: Run Trivy vulnerability scanner
139139
uses: aquasecurity/trivy-action@0.29.0

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ARG TARGET=production
2+
13
# Stage 1: Dependencies
24
FROM node:24.8.0-bullseye AS dependencies
35

@@ -35,9 +37,9 @@ RUN apt-get update \
3537
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
3638
&& locale-gen
3739

38-
ENV LANG en_US.UTF-8
39-
ENV LANGUAGE en_US:en
40-
ENV LC_ALL en_US.UTF-8
40+
ENV LANG=en_US.UTF-8
41+
ENV LANGUAGE=en_US:en
42+
ENV LC_ALL=en_US.UTF-8
4143

4244
WORKDIR /app
4345

@@ -80,8 +82,8 @@ RUN chmod 777 -R /home/node /tmp \
8082
USER node
8183

8284
# Add necessary stuff to bash autocomplete
83-
ENV PATH "$PATH:/home/node/.local/bin"
84-
ENV XDG_RUNTIME_PATH /home/node/.tmp
85+
ENV PATH="$PATH:/home/node/.local/bin"
86+
ENV XDG_RUNTIME_PATH=/home/node/.tmp
8587

8688
RUN echo 'eval "$(thefuck --alias)"' >> /home/node/.bashrc
8789

@@ -112,6 +114,3 @@ COPY --from=builder /app/dist/angular-frontend /usr/share/nginx/html
112114
EXPOSE 80
113115

114116
CMD ["nginx", "-g", "daemon off;"]
115-
116-
# Final stage selection based on build argument
117-
FROM ${TARGET:-development}

0 commit comments

Comments
 (0)