forked from cortezaproject/corteza
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
60 lines (46 loc) · 1.45 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
57
58
59
60
# ubuntu image
FROM ubuntu:20.04
# Set environment variables to prevent prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Update package manager and install prerequisites
# install make for building local makefile
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
wget \
make \
software-properties-common \
build-essential \
git \
&& apt-get clean
# sudo \
# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y nodejs
# Verify Node.js installation
RUN node -v && npm -v
# Install Go
ENV GO_VERSION=1.22.0
# RUN wget https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz \
RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \
&& rm go${GO_VERSION}.linux-amd64.tar.gz
# Set Go environment variables
ENV PATH=$PATH:/usr/local/go/bin
ENV GOPATH=/go
# Verify Go installation
RUN go version
# copy local code
WORKDIR /corteza
COPY . .
# Go to server/webapp directory and run make with VERSION
RUN cd server/webapp && make VERSION=2023.9.8
# Go to server directory and run make watch with sudo
# RUN cd server && sudo make watch
# RUN cd server && make watch
# Copy the entrypoint script into the container
COPY entrypoint.sh /entrypoint.sh
# Make the script executable
RUN chmod +x /entrypoint.sh
# Set the entrypoint to run the script
ENTRYPOINT ["/entrypoint.sh"]