Skip to content

Commit

Permalink
remove rootless dind
Browse files Browse the repository at this point in the history
use just dind
  • Loading branch information
dciangot authored May 31, 2024
1 parent 3bb2353 commit 76f99e0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions docker/Dockerfile.sidecar-docker
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o bin/docker-sidecar cmd/main.go
FROM bash:latest as bash-stage

# Deploy the application binary into a lean image
FROM docker:24.0-dind-rootless AS build-release-stage
FROM docker:26.1.3-dind AS build-release-stage

WORKDIR /

USER root:root

RUN mkdir -p /sidecar && chown -R 1000:1000 /sidecar


USER 1000:1000
RUN mkdir -p /sidecar

COPY --from=build-stage /app/bin/docker-sidecar /sidecar/docker-sidecar

Expand All @@ -28,12 +25,9 @@ ENV INTERLINKCONFIGPATH=/InterLinkConfig.yaml
ENV PATH "$PATH:/bin"

#creating a simple startup script to start both docker rootless and the sidecar
RUN echo -e '#!/bin/bash\ndockerd-entrypoint.sh & /sidecar/docker-sidecar' > /sidecar/startup-docker.sh
RUN echo -e '#!dockerd & /sidecar/docker-sidecar' > /sidecar/startup-docker.sh
RUN chmod +x /sidecar/startup-docker.sh

#setting up the path for the docker daemon
ENV DOCKER_HOST=unix:///run/user/1000/docker.sock

WORKDIR /sidecar

ENTRYPOINT ["/sidecar/startup-docker.sh"]

0 comments on commit 76f99e0

Please sign in to comment.