Fix dockerfile and makefile

This commit is contained in:
2021-04-10 08:12:06 +02:00
parent 4bb38a797c
commit e93d2d2c8b
2 changed files with 11 additions and 9 deletions

View File

@@ -16,14 +16,13 @@ RUN go mod download
COPY . /app
RUN rm -rf /app/server/frontend
COPY --from=frontend-builder /app/frontend/dist /app/web/frontend/dist
RUN CGO_ENABLED=0 make build
RUN mv build/apiary /app/apiary
RUN CGO_ENABLED=0 INSTALL_PREFIX=/app make install
FROM alpine:latest
RUN apk add --no-cache curl
WORKDIR /app
COPY --from=builder /app/apiary.toml /app/apiary.toml
COPY --from=builder /app/apiary /app/apiary
COPY --from=builder /app/etc/apiary/apiary.toml /app/apiary.toml
COPY --from=builder /app/bin/apiary /app/apiary
EXPOSE 8080
EXPOSE 2222
CMD ["/app/apiary", "serve"]