Skip to content

Commit

Permalink
optimise dockerfiles for buildkit, update actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
circlesabound committed Apr 22, 2024
1 parent 4518066 commit 2fe0672
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/container-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: docker-compose build
run: docker-compose -f docker-compose.yml -f docker-compose.ci.yml build --build-arg GIT_COMMIT_HASH=${{ github.sha }}
env:
Expand Down
4 changes: 2 additions & 2 deletions agent.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ COPY tests tests
COPY src src
ARG GIT_COMMIT_HASH=-
ENV GIT_COMMIT_HASH=${GIT_COMMIT_HASH}
RUN cargo build --release --bin agent
RUN cargo build --release --bin agent --bin mgmt-server

FROM debian:bookworm-slim AS runtime
FROM debian:bookworm-slim AS agent-runtime
WORKDIR /app
RUN apt-get update \
&& apt-get install -y ca-certificates
Expand Down
6 changes: 3 additions & 3 deletions mgmt-server.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN apt-get update \
&& NODE_MAJOR=20 \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update \
&& apt-get install -y clang nodejs openjdk-17-jre-headless libgit2-1.5
&& apt-get install -y clang nodejs openjdk-17-jre-headless
COPY openapitools.json .
COPY package-lock.json .
COPY package.json .
Expand All @@ -42,7 +42,7 @@ COPY tests tests
COPY src src
ARG GIT_COMMIT_HASH=-
ENV GIT_COMMIT_HASH=${GIT_COMMIT_HASH}
RUN cargo build --release --bin mgmt-server
RUN cargo build --release --bin agent --bin mgmt-server

FROM node:lts-alpine AS web-builder
WORKDIR /app/web
Expand All @@ -53,7 +53,7 @@ COPY web /app/web
COPY openapi /app/openapi
RUN npm run build -- --configuration production

FROM debian:bookworm-slim AS runtime
FROM debian:bookworm-slim AS mgmt-server-runtime
WORKDIR /app
RUN apt-get update \
&& apt-get install -y ca-certificates
Expand Down

0 comments on commit 2fe0672

Please sign in to comment.