-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
Showing
7 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ COPY . . | |
RUN npm install | ||
|
||
EXPOSE 3000 | ||
|
||
CMD [ "node", "--require", "./instrumentation.js", "node_controller.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |