2023-04-04 13:17:55 +00:00
|
|
|
FROM alpine:3.17
|
|
|
|
|
|
|
|
# Install required dependencies
|
|
|
|
RUN apk update && \
|
|
|
|
apk add --no-cache \
|
|
|
|
openssl \
|
|
|
|
openssh \
|
|
|
|
curl \
|
|
|
|
wget \
|
|
|
|
git \
|
|
|
|
gnupg \
|
|
|
|
make \
|
|
|
|
xz \
|
|
|
|
gcc \
|
|
|
|
musl-dev \
|
|
|
|
libstdc++
|
|
|
|
|
|
|
|
# Install Golang
|
|
|
|
COPY --from=golang:1.19-alpine /usr/local/go/ /usr/local/go/
|
|
|
|
ENV PATH="/usr/local/go/bin:${PATH}"
|
|
|
|
|
|
|
|
# Install Node.js
|
2023-04-07 08:32:03 +00:00
|
|
|
COPY --from=node:18-alpine /usr/local/ /usr/local/
|
2023-04-04 13:17:55 +00:00
|
|
|
ENV NODE_PATH="/usr/local/lib/node_modules"
|
|
|
|
ENV PATH="/usr/local/bin:${PATH}"
|
|
|
|
|
|
|
|
# Set the working directory
|
|
|
|
WORKDIR /opengist
|
|
|
|
|
|
|
|
# Copy all source files
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# Build the application
|
|
|
|
RUN make
|
|
|
|
|
2023-04-06 23:52:56 +00:00
|
|
|
# Expose the ports
|
|
|
|
EXPOSE 6157 2222
|
2023-04-04 13:17:55 +00:00
|
|
|
|
|
|
|
# Mount the .opengist volume
|
|
|
|
VOLUME /root/.opengist
|
|
|
|
|
|
|
|
# Run the webserver
|
|
|
|
CMD ["./opengist"]
|