Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes #14

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
FROM oven/bun:latest AS base

WORKDIR /usr/src/app

FROM base AS prerelease

ENV NODE_ENV=production
COPY package.json bun.lockb .
RUN bun install --frozen-lockfile --production
COPY . .
ENV NODE_ENV=production
RUN bun test
RUN bun run build

FROM base AS release
COPY --from=prerelease /usr/src/app/dist/index.js .

USER bun
ENV NODE_ENV=production
COPY --from=prerelease /usr/src/app/dist/index.js .
EXPOSE 3000/tcp
ENTRYPOINT [ "bun", "run", "index.js" ]
2 changes: 1 addition & 1 deletion src/engine/DockerEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class DockerEngine implements IEngine {
private async getContainerId(container_name: string) {
if (this.container_id) return this.container_id
const data = await this.docker<ContainerInfo[]>(
`/containers/json?filters={"name":["${container_name}"]}`
`/containers/json?filters={"name":["^${container_name}$"]}`
)
if (data.length) this.container_id = data[0].Id
return this.container_id
Expand Down