Skip to content
Snippets Groups Projects
Commit 7acc20dc authored by Sjoerd Simons's avatar Sjoerd Simons
Browse files

HACKS

parent 296c030a
Branches
No related tags found
No related merge requests found
Pipeline #41283 passed
# Global ARGs shared by all stages
ARG DEBIAN_FRONTEND=noninteractive
ARG GOPATH=/usr/local/go
# Build aplty
FROM debian:bullseye-slim as builder
ENV LC_ALL=C.UTF-8
ARG GOPATH
ENV GOPATH=${GOPATH}
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
gcc \
git \
golang-go \
libc6-dev
RUN git clone https://gitlab.collabora.com/obs/aptly.git $GOPATH/src/gitlab.collabora.com/obs/aptly \
&& cd $GOPATH/src/gitlab.collabora.com/obs/aptly \
&& make install
FROM debian:bullseye-slim as server FROM debian:bullseye-slim as server
LABEL maintainer Andrej Shadura <andrew.shadura@collabora.co.uk> LABEL maintainer Andrej Shadura <andrew.shadura@collabora.co.uk>
ENV LC_ALL=C.UTF-8 ENV LC_ALL=C.UTF-8
ARG DEBIAN_FRONTEND=noninteractive
ARG WORKDIR=/tmp/sources ARG WORKDIR=/tmp/sources
ARG DEBIAN_FRONTEND
ARG GOPATH
# Needs checking what’s actually needed # Needs checking what’s actually needed
RUN apt-get update \ RUN apt-get update \
...@@ -16,7 +40,6 @@ RUN apt-get update \ ...@@ -16,7 +40,6 @@ RUN apt-get update \
diffutils \ diffutils \
dpkg-dev \ dpkg-dev \
git \ git \
golang-go \
locales \ locales \
libbssolv-perl \ libbssolv-perl \
libcompress-raw-zlib-perl \ libcompress-raw-zlib-perl \
...@@ -48,11 +71,6 @@ RUN apt-get update \ ...@@ -48,11 +71,6 @@ RUN apt-get update \
apt-utils \ apt-utils \
reprepro reprepro
RUN git clone https://gitlab.collabora.com/obs/aptly.git $GOPATH/src/gitlab.collabora.com/obs/aptly \
&& cd $GOPATH/src/gitlab.collabora.com/obs/aptly \
&& make modules install \
&& rm -rf $GOPATH/src/gitlab.collabora.com/obs/aptly
COPY . $WORKDIR COPY . $WORKDIR
RUN make -C $WORKDIR/dist install RUN make -C $WORKDIR/dist install
...@@ -82,6 +100,8 @@ VOLUME /etc/obs ...@@ -82,6 +100,8 @@ VOLUME /etc/obs
COPY docker/services/aptly/aptly.conf /etc/obs/aptly.conf COPY docker/services/aptly/aptly.conf /etc/obs/aptly.conf
RUN /opt/configure-backend-user.sh RUN /opt/configure-backend-user.sh
COPY --from=builder $GOPATH/bin/aptly /usr/local/bin/aptly
RUN mkdir -p /srv/obs/log /srv/obs/run \ RUN mkdir -p /srv/obs/log /srv/obs/run \
&& chmod ug=rwxt /srv/obs/run \ && chmod ug=rwxt /srv/obs/run \
&& chown obsrun:obsrun -R /srv/obs && chown obsrun:obsrun -R /srv/obs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment