Files
opencloud/Dockerfile
Ralf Haferkamp 26f3e23b79 dev: Enable VIPS in local docker builds
As libvips is not available as a static library we can no longer
create a statically linked ocis binary for the docker images when
libvips is enabled.
We also need to make sure that the base images used for building
ocis needs to match the image where ocis is installed when creating
a shared binary.
2024-10-17 14:05:27 +02:00

45 lines
1.1 KiB
Docker

# Please use this Dockerfile only if
# you want to build an image from source without
# pnpm and Go installed on your dev machine.
# You can build oCIS using this Dockerfile
# by running following command:
# `docker build -t owncloud/ocis:custom .`
# In most other cases you might want to run the
# following command instead:
# `make -C ocis dev-docker`
# It will build a `owncloud/ocis:dev` image for you
# and use your local pnpm and Go caches and therefore
# is a lot faster than the build steps below.
FROM owncloudci/nodejs:18 as generate
COPY ./ /ocis/
WORKDIR /ocis/ocis
RUN make ci-node-generate
FROM owncloudci/golang:1.22 as build
COPY --from=generate /ocis /ocis
WORKDIR /ocis/ocis
RUN make ci-go-generate build ENABLE_VIPS=true
FROM alpine:3.20
RUN apk add --no-cache ca-certificates mailcap tree attr curl vips && \
echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="ownCloud Infinite Scale" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
ENTRYPOINT ["/usr/bin/ocis"]
CMD ["server"]
COPY --from=build /ocis/ocis/bin/ocis /usr/bin/ocis