This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
forked from speakeasy-api/sdk-generation-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
68 lines (50 loc) · 1.44 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
61
62
63
64
65
66
67
68
## Build
FROM golang:1.21-alpine as builder
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY *.go ./
COPY internal/ ./internal/
COPY pkg/ ./pkg/
RUN go build -o /action
## Deploy
FROM golang:1.21-alpine
RUN apk update
RUN apk add git bash curl
### Install Node
RUN apk add --update --no-cache nodejs npm
### Install Python
RUN apk add --update --no-cache python3 py3-pip
### Install Java
RUN apk add --update --no-cache openjdk11 gradle
### Install Ruby
RUN apk add --update --no-cache build-base ruby ruby-bundler ruby-dev
### Install .NET 6.0
ENV DOTNET_ROOT=/usr/lib/dotnet
RUN apk add --update --no-cache dotnet6-sdk curl bash
# Install .NET 5.0
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 5.0 -InstallDir ${DOTNET_ROOT}
RUN ${DOTNET_ROOT}/dotnet --list-sdks
### Install PHP and Composer
#### Source: https://github.com/geshan/docker-php-composer-alpine/blob/master/Dockerfile
RUN apk --update --no-cache add wget \
curl \
git \
php \
php-curl \
php-openssl \
php-iconv \
php-json \
php-mbstring \
php-phar \
php-dom --repository http://nl.alpinelinux.org/alpine/edge/testing/
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
RUN mkdir -p /var/www
WORKDIR /var/www
COPY . /var/www
VOLUME /var/www
### END PHP
WORKDIR /
COPY --from=builder /action /action
ENTRYPOINT ["/action"]