-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
56 lines (44 loc) · 1.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM ruby:3.4-alpine
# Create and set the working directory as /opt
RUN mkdir -p /opt/traject/output
WORKDIR /opt/traject
ENV BUNDLER_VERSION 2.5.22
RUN apk add --no-cache \
curl \
zip \
python3 \
libxml2-dev \
libxslt-dev \
jq \
util-linux \
&& apk add --no-cache --virtual build-dependencies \
build-base \
&& apk add --no-cache --virtual python-dependencies \
py-pip \
python3-dev \
&& apk del python-dependencies \
&& gem install bundler
# Copy the Gemfile and Gemfile.lock, and run bundle install prior to copying all source files
# This is an optimization that will prevent the need to re-run bundle install when only source
# code is changed and not dependencies.
COPY Gemfile /opt/traject/
COPY Gemfile.lock /opt/traject/
RUN bundle config build.nokogiri --use-system-libraries && \
bundle install --without test && \
apk del build-dependencies
COPY . /opt/traject/
ENV SKIP_FETCH_DATA false
ENV S3_BASE_URL https://s3-us-west-2.amazonaws.com
ENV AWS_DEFAULT_REGION us-west-2
# Metadata params
ARG BUILD_DATE
ARG VCS_REF
ARG VCS_URL
ENV VERSION=$VCS_REF
LABEL org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="DLME Traject transformer" \
org.label-schema.description="Transforms various source metadata into the DLME intermediate representation schema" \
org.label-schema.schema-version="1.0"
ENTRYPOINT ["/opt/traject/invoke.sh"]