Compare commits

..

9 Commits

Author SHA1 Message Date
Vitaliy Filippov be52cb21a7 Remove libdl build requirement 2024-07-26 18:55:50 +03:00
Vitaliy Filippov 648ff8eea1 Cache layers during Docker build, take source from the current dir instead of cloning 2022-12-10 13:20:43 +03:00
Vitaliy Filippov eb82bfe28b
Merge pull request #361 from jumoog/master
reduce docker image size even more
2022-12-10 13:10:12 +03:00
Vitaliy Filippov f9e9fe510d
Merge pull request #363 from junghans/patch-1
Syncer.hh: fix build with gcc-12
2022-12-10 12:57:20 +03:00
Vitaliy Filippov ae38035ef4
Merge pull request #371 from jasper1378/master
Fix CMake CMP0004 Error
2022-12-10 12:56:59 +03:00
Christoph Junghans b788284020 Syncer.hh: fix build with gcc-12 2022-12-04 16:31:16 +01:00
Kilian von Pflugk cd4665ae1b reduce docker image size even more 2022-12-04 16:24:07 +01:00
Jasper Young 5c8e87ee9a Fix CMake CMP0004 Error 2022-09-20 20:10:28 -04:00
Christoph Junghans 3cf1c058a3
Syncer.hh: fix build with gcc-12 2022-05-21 09:36:52 -06:00
6 changed files with 29 additions and 32 deletions

View File

@ -1,4 +1,5 @@
.git *
Dockerfile !cmake
.dockerignore !grive
.gitignore !libgrive
!CMakeLists.txt

View File

@ -1,27 +1,25 @@
FROM alpine:3.7 as build FROM alpine:3.7 as build
RUN apk add git make cmake g++ libgcrypt-dev yajl-dev yajl \ RUN apk add make cmake g++ libgcrypt-dev yajl-dev yajl \
boost-dev curl-dev expat-dev cppunit-dev binutils-dev \ boost-dev curl-dev expat-dev cppunit-dev binutils-dev \
pkgconfig \ pkgconfig
&& git clone https://github.com/vitalif/grive2.git \
&& mkdir grive2/build \ ADD . /grive2
&& cd grive2/build \
RUN mkdir /grive2/build \
&& cd /grive2/build \
&& cmake .. \ && cmake .. \
&& make -j4 \ && make -j4 install
&& make install \
&& cd ../.. \
&& rm -rf grive2 \
&& mkdir /drive
FROM alpine:3.7 FROM alpine:3.7
COPY --from=build /usr/local/bin/grive /bin/grive
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 /bin/dumb-init RUN apk add yajl libcurl libgcrypt boost-program_options boost-regex libstdc++ boost-system \
RUN chmod 777 /bin/dumb-init /bin/grive \
&& mkdir /data \
&& apk add yajl-dev curl-dev libgcrypt \
boost-program_options boost-regex libstdc++ boost-system boost-dev binutils-dev \
&& apk add boost-filesystem --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main && apk add boost-filesystem --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
COPY --from=build /usr/local/bin/grive /bin/grive
RUN chmod 777 /bin/grive \
&& mkdir /data
VOLUME /data VOLUME /data
WORKDIR /data WORKDIR /data
ENTRYPOINT ["dumb-init", "grive"] ENTRYPOINT grive

View File

@ -1,12 +1,6 @@
find_library( DL_LIBRARY NAMES dl PATH ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} )
find_library( BFD_LIBRARY NAMES bfd PATH ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} ) find_library( BFD_LIBRARY NAMES bfd PATH ${CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES} )
if ( DL_LIBRARY AND BFD_LIBRARY ) if ( BFD_LIBRARY )
set( BFD_FOUND TRUE ) set( BFD_FOUND TRUE )
endif (DL_LIBRARY AND BFD_LIBRARY)
if ( BFD_FOUND )
message( STATUS "Found libbfd: ${BFD_LIBRARY}") message( STATUS "Found libbfd: ${BFD_LIBRARY}")
endif ( BFD_LIBRARY )
endif ( BFD_FOUND )

View File

@ -27,6 +27,9 @@ IF(LIBGCRYPTCONFIG_EXECUTABLE)
EXEC_PROGRAM(${LIBGCRYPTCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_CFLAGS) EXEC_PROGRAM(${LIBGCRYPTCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_CFLAGS)
string(REPLACE "fgrep: warning: fgrep is obsolescent; using grep -F" "" LIBGCRYPT_LIBRARIES "${LIBGCRYPT_LIBRARIES}")
string(STRIP "${LIBGCRYPT_LIBRARIES}" LIBGCRYPT_LIBRARIES)
IF(${LIBGCRYPT_CFLAGS} MATCHES "\n") IF(${LIBGCRYPT_CFLAGS} MATCHES "\n")
SET(LIBGCRYPT_CFLAGS " ") SET(LIBGCRYPT_CFLAGS " ")
ENDIF(${LIBGCRYPT_CFLAGS} MATCHES "\n") ENDIF(${LIBGCRYPT_CFLAGS} MATCHES "\n")

View File

@ -22,7 +22,7 @@ ENDIF ( CPPUNIT_FOUND )
# build bfd classes if libbfd and the backtrace library is found # build bfd classes if libbfd and the backtrace library is found
if ( BFD_FOUND AND Backtrace_FOUND ) if ( BFD_FOUND AND Backtrace_FOUND )
set( OPT_LIBS ${DL_LIBRARY} ${BFD_LIBRARY} ${Backtrace_LIBRARY} ) set( OPT_LIBS ${BFD_LIBRARY} ${Backtrace_LIBRARY} )
file( GLOB OPT_SRC file( GLOB OPT_SRC
src/bfd/*.cc src/bfd/*.cc
) )

View File

@ -21,6 +21,7 @@
#include "util/FileSystem.hh" #include "util/FileSystem.hh"
#include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include <iosfwd> #include <iosfwd>