Files
docker-ocis/Dockerfile
Roman Vanicek 56a8ddf11b
All checks were successful
continuous-integration/drone/push Build is passing
Upgrade to ocis 7.1.2
2025-05-13 08:57:12 +00:00

67 lines
1.8 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 patches/ /patches/
RUN set -e -x; \
cd /; \
git clone --depth 1 --branch v7.1.2 https://github.com/owncloud/ocis.git; \
cd /ocis; \
git apply /patches/002-dav-move-unlock.patch; \
git apply /patches/003-dav-locks-parsing.patch; \
cd /ocis/ocis; \
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 attr ca-certificates curl inotify-tools libc6-compat mailcap tree 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"
RUN addgroup -g 1000 -S ocis-group && \
adduser -S --ingroup ocis-group --uid 1000 ocis-user --home /var/lib/ocis && \
mkdir -p /var/lib/ocis && \
chown -R ocis-user:ocis-group /var/lib/ocis && \
chmod -R 751 /var/lib/ocis && \
mkdir -p /etc/ocis && \
chown -R ocis-user:ocis-group /etc/ocis && \
chmod -R 751 /etc/ocis
VOLUME [ "/var/lib/ocis", "/etc/ocis" ]
WORKDIR /var/lib/ocis
USER 1000
EXPOSE 9200/tcp
ENTRYPOINT ["/usr/bin/ocis"]
CMD ["server"]
COPY --from=build /ocis/ocis/bin/ocis /usr/bin/ocis