Skip to content

Commit

Permalink
[TECH] Remove the Devcontainer/Docker container (#3611)
Browse files Browse the repository at this point in the history
  • Loading branch information
CommandMC authored Mar 9, 2024
1 parent 9213624 commit 43423e3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 84 deletions.
14 changes: 0 additions & 14 deletions .devcontainer/devcontainer.json

This file was deleted.

2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

3 changes: 0 additions & 3 deletions Dockerfile

This file was deleted.

65 changes: 0 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Heroic is built with Web Technologies:
- [Building Heroic Binaries](#building-heroic-binaries)
- [Building with VS Code](#building-with-vs-code)
- [Quickly testing/debugging Heroic on your own system](#quickly-testingdebugging-heroic-on-your-own-system)
- [Development Using a Container](#development-using-a-container)
- [Testing with Docker](#testing-with-docker)
- [Sponsors](#sponsors)
- [Screenshots](#screenshots)
Expand Down Expand Up @@ -251,70 +250,6 @@ Go to the "Run and Debug" tab of VSCode and start the "Launch Heroic (HMR & HR)"

Note: If you do not need the React developer tools while testing changes, you can skip their install by setting the `HEROIC_NO_REACT_DEVTOOLS` environment variable before running `yarn start` (for example with `HEROIC_NO_REACT_DEVTOOLS=1 yarn start`).

### Development Using a Container

<details>
<summary>Expand</summary>

If you would prefer, we have a docker container defined to develop / build Heroic with (a potential reason being to avoid loading tons of dependencies on your host filesystem). There are two methods, based on whether you use VS Code.

**VS Code**

There is a `.devcontainer` directory containing a definition that VS Code will recognize for automatically opening your local Heroic directory in a container in VS Code.

**NOTE: this requires that you install the 'Remote - Containers' extension.**

1. Open the root of your local Heroic directory in VS Code.
2. You should get a prompt in the bottom right to build and open the project in the dev container.
3. If the above prompt does not occur, on the bottom left, there is a green icon that should be there if the remote extension is installed. Click on it, and select "Reopen in container".
4. The bottom left green icon should now say: "Dev Container: Heroic Games Launcher".

After the container's package manager runs, open a new terminal session and you should be able to run bash commands from within the container. Any yarn dist:linux builds should also now show up on your host filesystem.

**Manually Building the Docker Image**

If you don't use VS Code or don't want it integrated with the container, you can build and run the container manually using either Docker or Podman.

1. From the root of your local Heroic directory, run:

```bash
docker build -t heroicdevcontainer -f Dockerfile .
```

2. Assuming all went well, you can now enter the container:

```bash
docker run -it -v ./:/tmp/heroic localhost/heroicdevcontainer:latest
```

3. The above command will mount your local Heroic dir to `/tmp/heroic` in the container (unless you used a different path).

```
cd /tmp/heroic
```

And you should be good to go, code and build away!

</details>

### Testing with Docker

It is recommended to run end to end tests with Docker so you don't alter your local config files or have your local config files interfere with the tests.

To run e2e tests on the unpackaged app running in dev mode.
From the root of your local Heroic directory, run:

```bash
yarn test:e2e
```

To run e2e tests on the packaged app.
From the root of your local Heroic directory, run:

```bash
yarn test:e2ePackaged
```

## Sponsors

Thanks [Weblate](https://weblate.org/en/) for hosting our translations
Expand Down

0 comments on commit 43423e3

Please sign in to comment.