mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-13 05:47:12 +02:00
Add Dockerfile
This commit is contained in:
43
Dockerfile
Normal file
43
Dockerfile
Normal file
@ -0,0 +1,43 @@
|
||||
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
|
||||
COPY --from=node:16-alpine /usr/local/ /usr/local/
|
||||
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
|
||||
|
||||
# Expose the port for the webserver
|
||||
EXPOSE 6157
|
||||
|
||||
# Mount the .opengist volume
|
||||
VOLUME /root/.opengist
|
||||
|
||||
# Run the webserver
|
||||
CMD ["./opengist"]
|
Reference in New Issue
Block a user