docker fix
This commit is contained in:
		
							
								
								
									
										33
									
								
								.gitea/workflows/deploy.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								.gitea/workflows/deploy.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
name: Build and push container image
 | 
			
		||||
run-name: ${{ gitea.actor }} is building and pushing container image
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - master
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  GITEA_DOMAIN: git.alfieking.dev
 | 
			
		||||
  GITEA_REGISTRY_USER: acetheking987
 | 
			
		||||
  RESULT_IMAGE_NAME: DiceCloud/alfieking.dev
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build-and-push-image:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    container:
 | 
			
		||||
      image: catthehacker/ubuntu:act-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
      - name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v3
 | 
			
		||||
      - name: Log in to registry
 | 
			
		||||
        uses: docker/login-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          registry: ${{ env.GITEA_DOMAIN }}
 | 
			
		||||
          username: ${{ env.GITEA_REGISTRY_USER }}
 | 
			
		||||
          password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
 | 
			
		||||
      - name: Build and push image
 | 
			
		||||
        uses: docker/build-push-action@v6
 | 
			
		||||
        with:
 | 
			
		||||
          push: true
 | 
			
		||||
          tags: ${{ env.GITEA_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}:latest
 | 
			
		||||
							
								
								
									
										42
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								Dockerfile
									
									
									
									
									
								
							@@ -1,14 +1,28 @@
 | 
			
		||||
FROM ubuntu:latest
 | 
			
		||||
RUN apt-get update --quiet \
 | 
			
		||||
    && apt-get install --quiet --yes \
 | 
			
		||||
    bsdtar \
 | 
			
		||||
    curl \
 | 
			
		||||
    git
 | 
			
		||||
RUN ln --symbolic --force $(which bsdtar) $(which tar)
 | 
			
		||||
RUN useradd --create-home --shell /bin/bash dicecloud
 | 
			
		||||
USER dicecloud
 | 
			
		||||
WORKDIR /home/dicecloud
 | 
			
		||||
RUN curl https://install.meteor.com/?release=1.8.0.2 | sh
 | 
			
		||||
ENV PATH="${PATH}:/home/dicecloud/.meteor"
 | 
			
		||||
COPY dev.sh ./dev.sh
 | 
			
		||||
ENTRYPOINT ./dev.sh
 | 
			
		||||
FROM ubuntu:jammy
 | 
			
		||||
 | 
			
		||||
USER root
 | 
			
		||||
RUN adduser --system mt
 | 
			
		||||
 | 
			
		||||
RUN apt-get update
 | 
			
		||||
RUN apt-get install --quiet --yes curl
 | 
			
		||||
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
 | 
			
		||||
RUN apt-get update
 | 
			
		||||
RUN apt-get install --quiet --yes nodejs git
 | 
			
		||||
 | 
			
		||||
USER mt
 | 
			
		||||
 | 
			
		||||
RUN curl https://install.meteor.com/ | sh
 | 
			
		||||
 | 
			
		||||
WORKDIR /home/mt
 | 
			
		||||
RUN git clone https://github.com/ThaumRystra/DiceCloud dicecloud
 | 
			
		||||
WORKDIR /home/mt/dicecloud/app
 | 
			
		||||
RUN git checkout master
 | 
			
		||||
RUN npm install --production
 | 
			
		||||
ENV PATH=$PATH:/home/mt/.meteor
 | 
			
		||||
RUN meteor build --directory ~/dc/ --architecture os.linux.x86_64
 | 
			
		||||
WORKDIR /home/mt/dc/bundle/programs/server
 | 
			
		||||
RUN npm install
 | 
			
		||||
WORKDIR /home/mt/dc/bundle
 | 
			
		||||
RUN rm -r /home/mt/dicecloud
 | 
			
		||||
 | 
			
		||||
ENTRYPOINT ["node", "main.js"]
 | 
			
		||||
		Reference in New Issue
	
	Block a user