forked from USGS-VIZLAB/vue-scratch
-
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:stretch
LABEL maintainer="[email protected]"
# 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_10.x | bash - && \
apt-get install nodejs -y
# Create temp directory for building viz app
RUN mkdir -p /tmp/gw-conditions
# Copy source code
WORKDIR /tmp/gw-conditions
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