Switched base container for the docker build (#57)

This commit is contained in:
Redblueflame 2020-08-29 16:56:50 +02:00 committed by GitHub
parent a8340f37bb
commit 2196b53075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View File

@ -1,2 +1,3 @@
target target
.env .env
Dockerfile

View File

@ -16,10 +16,9 @@ jobs:
- name: Build and push Docker images - name: Build and push Docker images
uses: docker/build-push-action@v1 uses: docker/build-push-action@v1
with: with:
username: ${{ github.actor }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.DOCKER_PASSWORD }}
registry: docker.pkg.github.com repository: modrinth/labrinth
repository: modrinth/labrinth/labrinth
tag_with_ref: false tag_with_ref: false
tags: master tags: master
tag_with_sha: true tag_with_sha: true

View File

@ -17,10 +17,9 @@ jobs:
- name: Build and push Docker images - name: Build and push Docker images
uses: docker/build-push-action@v1 uses: docker/build-push-action@v1
with: with:
username: ${{ github.actor }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.DOCKER_PASSWORD }}
registry: docker.pkg.github.com repository: modrinth/labrinth
repository: modrinth/labrinth/labrinth
tag_with_ref: true tag_with_ref: true
tags: latest tags: latest
tag_with_sha: true tag_with_sha: true

View File

@ -2,8 +2,8 @@ name: Docker image build
on: on:
push: push:
branches: branches-ignore:
- !master - master
pull_request: pull_request:
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always

View File

@ -23,10 +23,11 @@ ARG SQLX_OFFLINE=true
RUN cargo build --release RUN cargo build --release
FROM gcr.io/distroless/cc-debian10 FROM bitnami/minideb:latest
COPY --from=build /usr/src/labrinth/target/release/labrinth /labrinth RUN install_packages openssl
COPY --from=build /usr/src/labrinth/target/release/migrations/* /labrinth/migrations/ COPY --from=build /usr/src/labrinth/target/release/labrinth /labrinth/labrinth
COPY --from=build /usr/src/labrinth/migrations/* /labrinth/migrations/
COPY --from=build /wait /wait COPY --from=build /wait /wait
WORKDIR /labrinth WORKDIR /labrinth
CMD /wait && /opt/labrinth CMD /wait && /labrinth/labrinth