Skip to content
Open
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
27 changes: 1 addition & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,14 @@
FROM golang:1.21-alpine AS overlaybd_snapshotter_build
WORKDIR /work
RUN apk add git make
RUN git clone --branch v1.0.4 https://github.com/containerd/accelerated-container-image.git
RUN cd accelerated-container-image \
&& make \
&& make install

FROM alpine:3.19 AS overlaybd_build
WORKDIR /work
RUN apk add bash cmake curl-dev e2fsprogs-dev gcc g++ gflags-dev git gtest-dev make libaio-dev libnl3-dev linux-headers openssl-dev patch pkgconf sudo zlib-dev zstd-dev
RUN git clone https://github.com/superfly/overlaybd \
&& cd overlaybd \
&& git submodule update --init
RUN mkdir -p overlaybd/build \
&& cd overlaybd/build \
&& cmake ..
RUN cd overlaybd/build \
&& make -j$(nproc) \
&& make install

FROM golang:1.21 as dockerproxy_build
WORKDIR /app
COPY dockerproxy .
RUN GOOS=linux GARCH=amd64 CGO_ENABLED=0 go build -o dockerproxy -ldflags "-X main.gitSha=$BUILD_SHA -X main.buildTime=$(date +'%Y-%m-%dT%TZ')"

FROM docker:24.0.7-alpine3.19
ARG BUILD_SHA
RUN apk add bash pigz sysstat procps lsof util-linux-misc xz curl sudo libcurl e2fsprogs e2fsprogs-libs libaio libnl3 libssl3 zlib zstd-libs
RUN apk add bash pigz sysstat procps lsof util-linux-misc xz curl sudo
COPY etc/docker/daemon.json /etc/docker/daemon.json
COPY --from=dockerproxy_build /app/dockerproxy /dockerproxy
COPY --from=docker/buildx-bin:v0.12 /buildx /usr/libexec/docker/cli-plugins/docker-buildx
COPY --from=overlaybd_snapshotter_build /opt/overlaybd/snapshotter /opt/overlaybd/snapshotter
COPY --from=overlaybd_snapshotter_build /etc/overlaybd-snapshotter /etc/overlaybd-snapshotter
COPY --from=overlaybd_build /opt/overlaybd /opt/overlaybd
COPY --from=overlaybd_build /etc/overlaybd /etc/overlaybd
COPY ./entrypoint ./entrypoint
COPY ./docker-entrypoint.d/* ./docker-entrypoint.d/
ENV DOCKER_TMPDIR=/data/docker/tmp
Expand Down
1 change: 0 additions & 1 deletion dockerproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ func main() {
httpMux.Handle("/", wrapCommonMiddlewares(dockerProxy()))
httpMux.Handle("/flyio/v1/prune", wrapCommonMiddlewares(pruneHandler(dockerClient)))
httpMux.Handle("/flyio/v1/extendDeadline", wrapCommonMiddlewares((extendDeadline())))
httpMux.Handle("/flyio/v1/buildOverlaybdImage", wrapCommonMiddlewares(overlaybdImageHandler()))
httpMux.Handle("/flyio/v1/settings", wrapCommonMiddlewares(settingsHandler()))

httpServer := &http.Server{
Expand Down
62 changes: 0 additions & 62 deletions dockerproxy/overlaybd.go

This file was deleted.

Loading