Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
Fix container build #43
Browse files Browse the repository at this point in the history
  • Loading branch information
lixmal committed Sep 23, 2023
1 parent 37bd25a commit b6aa218
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine AS build
FROM alpine:3 AS build

WORKDIR /workspace

Expand All @@ -14,7 +14,7 @@ RUN apk add --no-cache npm \
&& npm run build


FROM alpine
FROM alpine:3

WORKDIR /keepass4web

Expand All @@ -24,9 +24,11 @@ COPY lib lib
COPY --from=build /workspace/public /keepass4web/public
COPY --from=build /workspace/config.yml /conf/

RUN apk add --no-cache --virtual .build-deps \
RUN \

# install build tools
alpine-sdk \
apk add --no-cache --virtual .build-deps \
build-base \
perl-app-cpanminus \
perl-dev \
# Kernel::Keyring
Expand All @@ -47,6 +49,7 @@ RUN apk add --no-cache --virtual .build-deps \
readline-dev \
# fixing some circular dependency problem
perl-libwww \

# install libs
&& apk add --no-cache \
perl \
Expand All @@ -66,11 +69,18 @@ RUN apk add --no-cache --virtual .build-deps \
ncurses-libs \
# Term::ReadLine::Gnu
readline \

# install perl dependencies
# Net::SSLeay's Makefile.PL requires a /usr/bin/openssl
&& ln -s /usr/bin/libressl-openssl /usr/bin/openssl \
# we need the dev version here to support alpine's libressl version
&& cpanm --no-wget --notest --self-contained CHRISN/Net-SSLeay-1.93_02.tar.gz \
&& cpanm --no-wget --installdeps . --with-all-features --with-recommends --with-suggests --notest --self-contained \

# remove build tools
&& apk del --purge .build-deps \
&& rm -rf ~/.cpan* cpanfile \

# redirect logs to stdout
&& sed -i "s/logger: 'File'/logger: 'Console'/" /conf/config.yml

Expand Down

0 comments on commit b6aa218

Please sign in to comment.