📦 EqualifyEverything / dockerized-wappalyzer

📄 Dockerfile · 29 lines
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# Start with a Go image as the base
FROM golang:1.16-alpine AS build

# Set environment variables for the app
ENV PORT=8087 \
    LOG_LEVEL=info \
    HTTP_PROXY= \
    HTTPS_PROXY=

# Copy the app source code to the container
COPY . /app

# Compile the app
RUN cd /app/scan && go build -o /bin/app

# Create a new image with just the compiled binary and necessary libraries
FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY --from=build /bin/app /bin/app

# Set environment variables for the app in the new image
ENV PORT=${PORT} \
    LOG_LEVEL=${LOG_LEVEL} \
    HTTP_PROXY=${HTTP_PROXY} \
    HTTPS_PROXY=${HTTPS_PROXY}

# Start the app on the specified port
CMD /bin/app