-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
32 lines (25 loc) · 947 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="gw-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 nodejs v20
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\
apt-get install -y nodejs
# Create temp directory for building viz app
RUN mkdir -p /tmp/snow-to-flow
# Copy source code
WORKDIR /tmp/snow-to-flow
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