nodejs
#
FROM node:12.18
WORKDIR /frontend
COPY package.json yarn.lock ./
RUN yarn
ARG APP_ENV
ENV APP_ENV ${APP_ENV}
COPY . /frontend
RUN yarn build:${APP_ENV}
EXPOSE 3000
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["yarn start:${APP_ENV}"]
python
#
FROM python:3.8-slim
ENV PYTHONUNBUFFERED 1
WORKDIR /app/src/
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY src/ .
EXPOSE 8000
---
FROM python:3.8-slim
ENV PYTHONUNBUFFERED 1
WORKDIR /app/src/
COPY Pipfile* ./
RUN pip install pipenv && pipenv lock --requirements > requirements.txt && pip install --no-cache-dir -r requirements.txt
COPY src/ .
EXPOSE 8000
golang
#
FROM golang:alpine as builder
RUN apk add -U --no-cache ca-certificates tzdata git
WORKDIR /go/src/app/
COPY src .
RUN cd src && go get -d -v ./... && CGO_ENABLED=0 GOOS=linux go build -v -a -installsuffix cgo -o app
FROM alpine:latest
COPY --from=builder /go/src/app/app /
RUN apk add -U --no-cache ca-certificates tzdata tini
USER nobody
EXPOSE 8080
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/app"]
FROM golang:alpine as builder
RUN apk add --no-cache git
RUN go get -u github.com/cbednarski/hostess
FROM alpine:latest
COPY --from=builder /go/bin/hostess /usr/local/bin/hostess
ENTRYPOINT [ "/bin/sh", "-c" ]