Skip to content

Commit

Permalink
fix: dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tiamo committed Sep 18, 2023
1 parent e758c68 commit 75be3db
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ ARG RUST_RELEASE_MODE

WORKDIR /app

#COPY Cargo.* .
#COPY src ./src
COPY . ./
COPY Cargo.* .
COPY src ./src

# Debug build
RUN --mount=type=cache,target=/app/target set -ex; \
Expand Down Expand Up @@ -96,17 +95,17 @@ RUN set -ex; \
FROM build-${TARGETARCH} AS build

## Final image
FROM alpine:${ALPINE_VERSION}
FROM --platform=$BUILDPLATFORM scratch
#FROM gcr.io/distroless/cc
#FROM alpine:${ALPINE_VERSION}

ARG UID
ARG GID

RUN apk add --no-cache \
ca-certificates

COPY --from=build --chmod=0755 /app/app /usr/local/bin

RUN ls -la /usr/local/bin
COPY --from=build --chmod=0755 /app/svt-agent /usr/local/bin

RUN addgroup -S -g ${GID} svt-agent && \
adduser -S -H -D -G svt-agent -u ${UID} -g "" -s /sbin/nologin svt-agent
Expand Down

0 comments on commit 75be3db

Please sign in to comment.