-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
53 lines (42 loc) · 1.21 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
FROM node:10-alpine
####
# Install SeaweedFS Client
####
ARG SEAWEEDFS_VERSION=3.43
ENV SEAWEEDFS_VERSION=$SEAWEEDFS_VERSION
ARG GOARCH=amd64
ENV GOARCH=$GOARCH
RUN apk update && \
apk add fuse3 && \
apk add fuse && \
apk add --no-cache --virtual build-dependencies --update wget curl ca-certificates && \
wget -qO /tmp/linux_${GOARCH}.tar.gz https://github.com/chrislusf/seaweedfs/releases/download/${SEAWEEDFS_VERSION}/linux_${GOARCH}.tar.gz && \
tar -C /usr/bin/ -xzvf /tmp/linux_${GOARCH}.tar.gz && \
apk del build-dependencies && \
rm -rf /tmp/*
####
# Install Docker volume driver API server
####
# Create directories for mounts
RUN mkdir -p /mnt/seaweedfs
RUN mkdir -p /mnt/docker-volumes
# Copy in package.json
COPY package.json package-lock.json /project/
# Switch to the project directory
WORKDIR /project
# Install project dependencies
RUN npm install
# Set Configuration Defaults
ENV HOST=filer \
PORT=8888 \
ALIAS=seaweedfs \
ROOT_VOLUME_NAME="" \
MOUNT_OPTIONS="" \
REMOTE_PATH=/docker/volumes \
LOCAL_PATH="" \
CONNECT_TIMEOUT=10000 \
LOG_LEVEL=info
# Copy in source code
COPY index.js /project
# Set the Docker entrypoint
ENTRYPOINT ["node", "index.js"]