forked from DOI-USGS/vizlab-home
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (25 loc) · 956 Bytes
/
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
FROM artifactory.wma.chs.usgs.gov/docker-official-mirror/debian:stable
LABEL maintainer="gs-w_vizlab@usgs.gov"
# Run updates and install curl
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install curl -y && \
apt-get purge -y --auto-remove && \
apt-get clean
# Enable the NodeSource repository and install the latest nodejs
RUN curl -sL https://deb.nodesource.com/setup_current.x | bash - && \
apt-get install nodejs -y
# Create temp directory for building viz app
RUN mkdir -p /tmp/vizlab-home
# Copy source code
WORKDIR /tmp/vizlab-home
COPY . .
# Set environment variables for build target and tile source and then run config.sh
# to insert the correct S3 tile source URLs in the Mapbox configuration file.
ARG BUILDTARGET="test"
ARG VUE_BUILD_MODE="development"
ENV E_BUILDTARGET=$BUILDTARGET
ENV E_VUE_BUILD_MODE=$VUE_BUILD_MODE
# Build the Vue app.
RUN npm install
RUN chmod +x ./build.sh && ./build.sh