Skip to content

Commit

Permalink
fix: container naming (#20)
Browse files Browse the repository at this point in the history
* fix: container naming

Signed-off-by: Martin Buchleitner <[email protected]>

* refactor: dockerfiles

Signed-off-by: Martin Buchleitner <[email protected]>

---------

Signed-off-by: Martin Buchleitner <[email protected]>
  • Loading branch information
mabunixda authored Dec 6, 2024
1 parent 860517d commit ccf3103
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
# MONDOO_SERVICE_ACCOUNT: "${{ fromJson(secrets.VAULT_KV_1D187965_OP_MONDOO_PACKER_AGENT).password }}"
with:
dockerfile: "${{ matrix.container }}/Dockerfile"
image_name: "${{ github.repository }}/${{matrix.container}}"
score: 50
platforms: "linux/amd64, linux/arm64"
release: false
5 changes: 4 additions & 1 deletion go/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@

#first stage - building golang artifact
FROM golang:1.20.12-alpine as builder
FROM golang:1.20.12-alpine AS builder
WORKDIR /src
COPY . .
RUN go mod download
RUN CGO_ENABLED=0 go build -o app .

# output container ...
FROM debian:buster-slim

COPY --from=builder /src/app /bin/app

EXPOSE 6000

CMD ["/bin/app"]
2 changes: 1 addition & 1 deletion kubernetes/go-events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
containers:
- name: go-events
image: mati007thm/dapr-distributed-calendar_go-events:manual
image: ghcr.io/infralovers/12-factor-app-go
env:
- name: APP_PORT
value: "6000"
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/node-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
spec:
containers:
- name: controller
image: mati007thm/dapr-distributed-calendar_controller:manual
image: ghcr.io/infralovers/12-factor-app-node
env:
- name: APP_PORT
value: "3000"
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/python-messages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
spec:
containers:
- name: messages
image: mati007thm/dapr-distributed-calendar_messages:manual
image: ghcr.io/infralovers/12-factor-app-python
env:
- name: "APP_PORT"
value: "5000"
Expand Down
1 change: 1 addition & 0 deletions node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ COPY . .
RUN npm install

EXPOSE 3000

CMD [ "node", "--require", "./instrumentation.js", "node_controller.js"]
10 changes: 5 additions & 5 deletions python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.11-alpine

COPY . /app
WORKDIR /app
# Install build dependencies
RUN apk add --no-cache gcc g++

RUN pip3 install -r /app/requirements.txt

RUN apk del gcc g++
RUN apk add --virtual build-deps --no-cache gcc g++ \
&& pip3 install -r /app/requirements.txt \
&& apk del build-deps

EXPOSE 5000

ENTRYPOINT ["python", "messages.py"]

0 comments on commit ccf3103

Please sign in to comment.